https://www.acmicpc.net/problem/1065
using System;
class Program
{
static void Main() {
string s=Console.ReadLine();
int x=int.Parse(s);
int count=99;
if(x<100) Console.Write(x);
else{
for(int i=100;i<=x;i++){
int a=i%10;
int b=(i/10)%10;
int c=(i/10)/10;
if(c-b==b-a) count++;
}
Console.WriteLine(count);
}
}
}