c="0." for i in range(1,100): c+=str(i) print(c[int(input())+1])