import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
if(str.length() <= 1 && str.length() <=1000)
{
int left = 0;
int right = str.length()-1;
System.out.print(palindrome(str,left,right));
}
}
public static boolean palindrome(String str,int left,int right)
{
if(right==0 || right == 1)
{
return true;
}
if(str.charAt(left) != str.charAt(right))
{
return false;
}
else
{
palindrome(str,left+1,right-1);
return true;
}
}
}