#include<iostream
using namespace std;
int main() {
long n1;
cin>> n1;
int p =0; // no. of digits
int num = 0;
// for counting no of digits
while(n1>0){
int r = n1%10;
p++;
n1 = n1/10;
}
//to check for armstrong no.
while(n1>0){
int r = n1%10;
num = num + r^p;
n1 = n1/10;
}
if(n1==num){
cout<<"true"<<endl;
}
else{
cout<<"false"<<endl;
}
return 0;
}
// Kindly correct my mistake as the code given above is not satisfying all test cases.