#include <iostream>

using namespace std;

int main()
{
    int n;

   // do
    {
        cout<<"give n"<<endl;
        cin>>n;
    }
    //while ((n<1)||(n>20 ));
        int v[n],c[n];
    cout<<"values of the gems"<<endl;
    for(int i=0; i<n; i++)
    {
        cin>>v[i];
    }
    cout<<"cost of the gems"<<endl;
    for(int i=0; i<n; i++)
    {
        cin>>c[i];
    }
    int res=0;
    for(int i=0;i<n;i++)
    {
        if(v[i]>c[i])
            res+=v[i]-c[i];
    }
    cout<<"the maximum possible value of X-Y is :"<<res<<endl;
        return 0;
}
