l = int(input()) c = "" for i in range(100): c += str(i+1) c = list(c) print(c[l-1])