#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
 	int v[n],c[n];
  for(int i=0;i<n;i++)
    cin>>v[i];
  for(int i=0;i<n;i++)
    cin>>c[i];
  int diff=0;
  for(int i=0;i<n;i++)
    if(v[i]>c[i])
      diff+=v[i]-c[i];
  cout<<diff<<endl;
}