#include <stdio.h>
#include <string.h>



int main(void){
char str[200]={0,};
int i;
int true=0;
scanf("%s", str);

	for (i = 0; i < strlen(str) / 2; i++) {
		if(str[i] == str[strlen(str) - i-1]){
      true = 1;
  }
    else{
      true = 0;
    }
  }
  if(true ==1){
    printf("1");
  }
  else{
    printf("0");
  }
    
  }