#include<bits/stdc++.h>
using namespace std;
#define LL unsigned long long int
int main()
{
string s;
cin >> s;
int a;
for(int i=0;i<s.size();i++)
{
a += s[i] - '0';
}
string t = to_string (a);
string temp = t;
reverse (temp.begin() , temp.end());
if(temp == t )
{
cout<< "palindrome" << endl;
}
else
{
cout << "Not Palindrome" << endl;
}
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBMTCB1bnNpZ25lZCBsb25nIGxvbmcgaW50CgppbnQgbWFpbigpIAp7CglzdHJpbmcgczsKCWNpbiA+PiBzOwoJaW50IGE7Cglmb3IoaW50IGk9MDtpPHMuc2l6ZSgpO2krKykKCXsKCQlhICs9IHNbaV0gLSAnMCc7Cgl9CgkKCXN0cmluZyB0ID0gdG9fc3RyaW5nIChhKTsKCXN0cmluZyB0ZW1wID0gdDsKCQoJcmV2ZXJzZSAodGVtcC5iZWdpbigpICwgdGVtcC5lbmQoKSk7CgkKCWlmKHRlbXAgPT0gdCApCgl7CgkJY291dDw8ICJwYWxpbmRyb21lIiA8PCBlbmRsOwoJfQoJZWxzZQoJewoJCWNvdXQgPDwgIk5vdCBQYWxpbmRyb21lIiA8PCBlbmRsOwoJCQoJfQp9Cg==