![](https://img-blog.csdnimg.cn/img_convert/8d2e082fd62bbcede3549807cef24576.png)
![](https://img-blog.csdnimg.cn/img_convert/1ee36b762d8324f9b5e4fcc8869bc99e.png)
#include <iostream>
#include<iomanip>
#include<math.h>
using namespace std;
int main() {
string a, b;
while(cin>>a>>b){
int ff = 0;
if (a.length() != b.length()) {
ff = 1;
}
else{
ff = 2;
for (int i = 0; i < a.length(); i++) {
if (a[i] != b[i]) ff = 0;
}
if (ff == 0) {
for (int i = 0; i < a.length(); i++) {
ff = 4;
if (a[i] + 32 == b[i] || a[i] - 32 == b[i] || a[i]==b[i]) ff = 3;
if (ff == 4)break;
}
}
}
cout << ff << endl;
}
return 0;
}