#include
#include<math.h>
using namespace std;
int main() {
long int remainder;
long int N;
long int sum = 0;
cin>>N;
long int X=N;
long int digits = 0;
while(N>0){
N = N/10;
digits = digits + 1;
}
while(N>0){
remainder = N%10;
N = N/10;
sum = sum + pow(remainder,digits);
}
if(sum == N){
cout<<“true”<<endl;
}
return 0;
}