def palindrome(s): if(s==s[::-1]): return True else: return False n=int(input()) ans=0 while(True): if(palindrome(str(n))): ans=n break n+=1 print(ans)
To embed this program on your website, copy the following code and paste it into your website's HTML: