import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		int total = 0;
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			total += Math.max(0, arr[i] - a);
		}
		System.out.println(total);
	}
} import java.util.*; util.* java public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		int total = 0;
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			total += Math.max(0, arr[i] - a);
		}
		System.out.println(total);
	}
} Main public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		int total = 0;
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			total += Math.max(0, arr[i] - a);
		}
		System.out.println(total);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		int total = 0;
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			total += Math.max(0, arr[i] - a);
		}
		System.out.println(total);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] arr = new int[n]; arr new int[n] n for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			arr[i] = sc.nextInt();
		} {
			arr[i] = sc.nextInt();
		} arr[i] = sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc int total = 0; total 0 for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			total += Math.max(0, arr[i] - a);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int a = sc.nextInt();
			total += Math.max(0, arr[i] - a);
		} {
			int a = sc.nextInt();
			total += Math.max(0, arr[i] - a);
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc total += Math.max(0, arr[i] - a) total Math.max(0, arr[i] - a) Math.max Math 0 arr[i] - a arr[i] arr i a System.out.println(total) System.out.println System.out System System.out total String[] args args public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		int total = 0;
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			total += Math.max(0, arr[i] - a);
		}
		System.out.println(total);
	}
} public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		int total = 0;
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			total += Math.max(0, arr[i] - a);
		}
		System.out.println(total);
	}
} Main
import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		int total = 0;
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			total += Math.max(0, arr[i] - a);
		}
		System.out.println(total);
	}
}
