v=str() for i in range(100): v += str(i+1) n = int(input()) print(list(v)[n-1])