c='1' for i in range(2,101): c+=str(i) print(c[int(input())-1])