#include <bits/stdc++.h>
using namespace std;

int main() {
  int n,a[25],temp;
  int sum=0;
  cin >> n;
  for(int i=0;i<n;i++)cin >> a[i];
  for(int i=0;i<n;i++){
    cin >> temp;
    if(temp<a[i])sum+=a[i]-temp;
  }
  cout << sum << endl;
}
