import java.util.*;
public class HuiWen
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
String str = in.nextLine();
StringBuilder sb = new StringBuilder();
sb.append(str);
char[] chs = sb.toString().toCharArray();
char[] chs1 = sb.reverse().toString().toCharArray();
boolean b = true;
for (int i = 0;i<chs.length ;i++ )
{
if (chs[i] != chs1[i])
{
b = false;
}
}
System.out.println(b);
}
}
public class HuiWen
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
String str = in.nextLine();
StringBuilder sb = new StringBuilder();
sb.append(str);
char[] chs = sb.toString().toCharArray();
char[] chs1 = sb.reverse().toString().toCharArray();
boolean b = true;
for (int i = 0;i<chs.length ;i++ )
{
if (chs[i] != chs1[i])
{
b = false;
}
}
System.out.println(b);
}
}