#include<bits/stdc++.h>
using namespace std;
string rev(string s)
{
reverse(s.begin(),s.end());
return s;
}
string add(string s1,string s2)
{
int carry = 0;
int num = 0;
for(int i=0;i<s1.length();i++)
{
num = s1[i]-'0'+s2[i]-'0'+carry;
if(num<=9)
carry = 0;
else
{
num = num%10;
carry = 1;
}
s1[i]=(num + '0');
num = 0;
}
if(carry>0)
s1 += (carry+'0');
reverse(s1.begin(),s1.end());
return s1;
}
int main()
{
string s;
getline(cin,s);
if(s==rev(s))
{
cout<<s<<" is a palindromic number."<<endl;
return 0;
}
int cnt = 10;
while(cnt--)
{
if(s!=rev(s)){
cout<<s<<" + "<<rev(s)<<" = "<<add(s,rev(s))<<endl;
s = add(s,rev(s));
}
else{
cout<<s<<" is a palindromic number."<<endl;
return 0;
}
}
cout<<"Not found in 10 iterations."<<endl;
return 0;
}