#include <iostream>
using namespace std;
bool judge(int n)
{
int help=1;
while(n/help>=10)
help*=10;
while(n!=0)
{
if(n/help!=n%10)
{
return false;
break;
}
n=(n%help)/10;
help/=100;
}
return true;
}
int main()
{
int n;
cin>>n;
bool res=judge(n);
cout<<res;
system("pause");
return 0;
}
using namespace std;
bool judge(int n)
{
int help=1;
while(n/help>=10)
help*=10;
while(n!=0)
{
if(n/help!=n%10)
{
return false;
break;
}
n=(n%help)/10;
help/=100;
}
return true;
}
int main()
{
int n;
cin>>n;
bool res=judge(n);
cout<<res;
system("pause");
return 0;
}