#include<iostream.h> 
 int main()                                                  
{
 const int N=30;
 char a[N],b[N];
 int i,c;
 cout<<"ÇëÊäÈëÁ½¸ö×Ö·û´®£º"<<endl;
 cin>>a>>b;
 for(i=0;a[i]!='\0'&&b[i]!='\0';i++)
  if(a[i]!=b[i])
   break;
 c=a[i]-b[i];
 cout<<c<<endl;
 return(0);
}
