#include <stdio.h>
#include <string.h>
int main(void) {
//读取字符串
//逆转字符串
//判断大小
int i,j,len=0;
char a[20]={0};
char b[20]={0};
gets(a);
len=strlen(a);
for(i=len-1,j=0;i>=0;i--) {
b[j]=a[i];
j++;
}
int result = strcmp(a,b);
if(result<0) {
printf("%d\n",-1);
}else if(result>0){
printf("%d\n",1);
}else {
printf("%d\n",0);
}
return 0;
}