#include int main(){ char s1[100],s2[100]; int i; scanf("%s%s",s1,s2); for(i = 0; s1[i]==s2[i] && s1[i] && s2[i]; i ++); printf("%d\n",s1[i]-s2[i]); return 0;}