testCase = do
  n <- getLine
  print . head . dropWhile (not.palindrome) $ [(read n) + 1 ..]
testCase = do
  n <- getLine
  print . head . dropWhile (not.palindrome) $ [(read n) + 1 ..]
testCase = do
  n <- getLine
  print . head . dropWhile (not.palindrome) $ [(read n) + 1 ..]