x =int(input()) lst = [] for i in range(1,101): lst.append(str(i)) a = "".join(lst) print(a[x-1])