//Arrum Shin
//Bergen County Academies
//Intermediate
#include 
using namespace std;
#define forn(i,n) for(int i = 0; i < (int) n; i++)
#define fornn(i,n) for(int i=1; i<(int)n; i++)
#define fornb(i,n) for(int i=n-1; i>-1; i--)
#define all(a) a.begin(), a.end()
typedef long long ll;
typedef vector vi;
int main () {
    freopen("2int_sampledata.txt","r",stdin);
    for(int j=0; j<5; j++) {
        string s, t;
        cin>>s>>t;
        int ind=0;
        while(indt.length())
            sum+=s.length()-t.length();
        else
            sum-=s.length()-t.length();
        cout<