#include <bits/stdc++.h>
using namespace std;

int palindrom(string s)
{
    string x=s;
    reverse(x.begin(), x.end());
    if (x==s)
        return 1;
    else
        return 0;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cerr.tie(NULL);
    cout.tie(NULL);

    string s;
    cin >> s;
    int x=s.length();
    int minlen[x]={0};
    if(palindrom(s)==1)
        cout << 1 << endl;
    return 0;
}