n = int(input()) if n < 100: for i in range(1, n+1): strI = str(i) lStrI = list(strI) rList = list(reversed(lStrI)) if lStrI == rList: print(i)