#include <iostream>
#include <cstring>
using namespace std;

bool palindrom(string s)
{
    int n = s.length();
    char niz[n + 1];
    strcpy(niz, s.c_str());
    bool nije=true;
    for (int i=0;i<n/2;i++)
    {
        if(niz[i]!=niz[n-1-i])
        {
             nije=false;
             break;
        }

    }
    return nije;
}

int main()
{
    string s;
    cin>>s;
    int n = s.length();

    char niz[n + 1];
    strcpy(niz, s.c_str());

    if(palindrom(s)){

        cout << 1;
    }


    return 0;
}