import java.util.Scanner;

public class Main {
	  public static void main(String args[]) {
		  //入力値取得
		    Scanner sc = new Scanner(System.in);
		    int n = sc.nextInt();
		    int cost[] = new int[n];
		    int value[] = new int[n];
		    for (int i = 0; i < n; i++)
		      cost[i] = sc.nextInt();
		    for (int i = 0; i < n; i++)
		      value[i] = sc.nextInt();

		    //COST-VALUE 積み上げて最大化させる
		    int ans = 0;
		      for (int i = 0; i < n; i++)
		        if (cost[i] > value[i]) {
		          ans += cost[i] - value[i];
		        }

		    System.out.println(ans);
		    sc.close();
		  }

} import java.util.Scanner; Scanner java.util public class Main {
	  public static void main(String args[]) {
		  //入力値取得
		    Scanner sc = new Scanner(System.in);
		    int n = sc.nextInt();
		    int cost[] = new int[n];
		    int value[] = new int[n];
		    for (int i = 0; i < n; i++)
		      cost[i] = sc.nextInt();
		    for (int i = 0; i < n; i++)
		      value[i] = sc.nextInt();

		    //COST-VALUE 積み上げて最大化させる
		    int ans = 0;
		      for (int i = 0; i < n; i++)
		        if (cost[i] > value[i]) {
		          ans += cost[i] - value[i];
		        }

		    System.out.println(ans);
		    sc.close();
		  }

} Main public static void main(String args[]) {
		  //入力値取得
		    Scanner sc = new Scanner(System.in);
		    int n = sc.nextInt();
		    int cost[] = new int[n];
		    int value[] = new int[n];
		    for (int i = 0; i < n; i++)
		      cost[i] = sc.nextInt();
		    for (int i = 0; i < n; i++)
		      value[i] = sc.nextInt();

		    //COST-VALUE 積み上げて最大化させる
		    int ans = 0;
		      for (int i = 0; i < n; i++)
		        if (cost[i] > value[i]) {
		          ans += cost[i] - value[i];
		        }

		    System.out.println(ans);
		    sc.close();
		  } main {
		  //入力値取得
		    Scanner sc = new Scanner(System.in);
		    int n = sc.nextInt();
		    int cost[] = new int[n];
		    int value[] = new int[n];
		    for (int i = 0; i < n; i++)
		      cost[i] = sc.nextInt();
		    for (int i = 0; i < n; i++)
		      value[i] = sc.nextInt();

		    //COST-VALUE 積み上げて最大化させる
		    int ans = 0;
		      for (int i = 0; i < n; i++)
		        if (cost[i] > value[i]) {
		          ans += cost[i] - value[i];
		        }

		    System.out.println(ans);
		    sc.close();
		  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int cost[] = new int[n]; cost new int[n] n int value[] = new int[n]; value new int[n] n for (int i = 0; i < n; i++)
		      cost[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i cost[i] = sc.nextInt(); cost[i] = sc.nextInt() cost[i] cost i sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++)
		      value[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i value[i] = sc.nextInt(); value[i] = sc.nextInt() value[i] value i sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 0; i < n; i++)
		        if (cost[i] > value[i]) {
		          ans += cost[i] - value[i];
		        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i if (cost[i] > value[i]) {
		          ans += cost[i] - value[i];
		        } if (cost[i] > value[i]) {
		          ans += cost[i] - value[i];
		        } cost[i] > value[i] cost[i] cost i value[i] value i {
		          ans += cost[i] - value[i];
		        } ans += cost[i] - value[i] ans cost[i] - value[i] cost[i] cost i value[i] value i System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String args[] args public class Main {
	  public static void main(String args[]) {
		  //入力値取得
		    Scanner sc = new Scanner(System.in);
		    int n = sc.nextInt();
		    int cost[] = new int[n];
		    int value[] = new int[n];
		    for (int i = 0; i < n; i++)
		      cost[i] = sc.nextInt();
		    for (int i = 0; i < n; i++)
		      value[i] = sc.nextInt();

		    //COST-VALUE 積み上げて最大化させる
		    int ans = 0;
		      for (int i = 0; i < n; i++)
		        if (cost[i] > value[i]) {
		          ans += cost[i] - value[i];
		        }

		    System.out.println(ans);
		    sc.close();
		  }

} public class Main {
	  public static void main(String args[]) {
		  //入力値取得
		    Scanner sc = new Scanner(System.in);
		    int n = sc.nextInt();
		    int cost[] = new int[n];
		    int value[] = new int[n];
		    for (int i = 0; i < n; i++)
		      cost[i] = sc.nextInt();
		    for (int i = 0; i < n; i++)
		      value[i] = sc.nextInt();

		    //COST-VALUE 積み上げて最大化させる
		    int ans = 0;
		      for (int i = 0; i < n; i++)
		        if (cost[i] > value[i]) {
		          ans += cost[i] - value[i];
		        }

		    System.out.println(ans);
		    sc.close();
		  }

} Main
import java.util.Scanner;

public class Main {
	  public static void main(String args[]) {
		  //入力値取得
		    Scanner sc = new Scanner(System.in);
		    int n = sc.nextInt();
		    int cost[] = new int[n];
		    int value[] = new int[n];
		    for (int i = 0; i < n; i++)
		      cost[i] = sc.nextInt();
		    for (int i = 0; i < n; i++)
		      value[i] = sc.nextInt();

		    //COST-VALUE 積み上げて最大化させる
		    int ans = 0;
		      for (int i = 0; i < n; i++)
		        if (cost[i] > value[i]) {
		          ans += cost[i] - value[i];
		        }

		    System.out.println(ans);
		    sc.close();
		  }

}