#include<bits/stdc++.h>
using namespace std;
string s;
int br;
bool palindrom(string s){
      int n=s.size();
  for(int i=0,j=n-1; i<=n-1, j>=0; i++,j--){
     if(s[i]==s[j])br++;
  }
     if(br==n)return true;
     else return false;
}
int main (){
    cin>>s;
   if(palindrom(s)){
    cout<<1<<endl;
   }
    return 0;
}