




"""simple docstring"""




def        a__					(							snake_case__							)		->   bool:
			return str(snake_case__							) == str(snake_case__							)[::-1]



def        a__					(							snake_case__							)		->   int:
			return int(snake_case__							) + int(str(snake_case__							)[::-1]							)



def        a__					(							snake_case__ = 1_00_00							)		->   int:
			lowerCamelCase      =   []
			for num in range(1			,					snake_case__							):
						lowerCamelCase      =   0
						lowerCamelCase      =   num
						while iterations < 50:
									lowerCamelCase      =   sum_reverse(snake_case__							)
									iterations += 1
									if is_palindrome(snake_case__							):
												break
						else:
									lychrel_nums.append(snake_case__							)
			return len(snake_case__							)


if __name__ == "__main__":
					print(F"""{solution() = }""")









"""simple docstring"""




def        a__					(							snake_case__ = 10_00							)		->   int:
			lowerCamelCase ,  lowerCamelCase      =   1, 1
			lowerCamelCase      =   2
			while True:
						lowerCamelCase      =   0
						lowerCamelCase      =   fa + fa
						lowerCamelCase ,  lowerCamelCase      =   fa, f
						index += 1
						for _ in str(snake_case__							):
									i += 1
						if i == n:
									break
			return index


if __name__ == "__main__":
					print(solution(int(str(input()).strip())))



