import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] gems = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			}
		}
		
		int[] costs = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			}
		}
		
		int[] values = new int[N];
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
		}
		int result = 0;
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
			if (values[i] > 0) {
				result += values[i];
			}
		}
		
		System.out.println(result);
		
	} 
} 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[] gems = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			}
		}
		
		int[] costs = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			}
		}
		
		int[] values = new int[N];
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
		}
		int result = 0;
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
			if (values[i] > 0) {
				result += values[i];
			}
		}
		
		System.out.println(result);
		
	} 
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] gems = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			}
		}
		
		int[] costs = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			}
		}
		
		int[] values = new int[N];
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
		}
		int result = 0;
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
			if (values[i] > 0) {
				result += values[i];
			}
		}
		
		System.out.println(result);
		
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] gems = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			}
		}
		
		int[] costs = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			}
		}
		
		int[] values = new int[N];
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
		}
		int result = 0;
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
			if (values[i] > 0) {
				result += values[i];
			}
		}
		
		System.out.println(result);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] gems = new int[N]; gems new int[N] N for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			}
		} {
			if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			}
		} if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			} sc.hasNext() sc.hasNext sc {
				gems[i] = sc.nextInt();
			} gems[i] = sc.nextInt() gems[i] gems i sc.nextInt() sc.nextInt sc int[] costs = new int[N]; costs new int[N] N for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			}
		} {
			if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			}
		} if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			} sc.hasNext() sc.hasNext sc {
				costs[i] = sc.nextInt();
			} costs[i] = sc.nextInt() costs[i] costs i sc.nextInt() sc.nextInt sc int[] values = new int[N]; values new int[N] N for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			values[i] = gems[i] - costs[i];
		} {
			values[i] = gems[i] - costs[i];
		} values[i] = gems[i] - costs[i] values[i] values i gems[i] - costs[i] gems[i] gems i costs[i] costs i int result = 0; result 0 for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
			if (values[i] > 0) {
				result += values[i];
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			values[i] = gems[i] - costs[i];
			if (values[i] > 0) {
				result += values[i];
			}
		} {
			values[i] = gems[i] - costs[i];
			if (values[i] > 0) {
				result += values[i];
			}
		} values[i] = gems[i] - costs[i] values[i] values i gems[i] - costs[i] gems[i] gems i costs[i] costs i if (values[i] > 0) {
				result += values[i];
			} values[i] > 0 values[i] values i 0 {
				result += values[i];
			} result += values[i] result values[i] values i System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] gems = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			}
		}
		
		int[] costs = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			}
		}
		
		int[] values = new int[N];
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
		}
		int result = 0;
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
			if (values[i] > 0) {
				result += values[i];
			}
		}
		
		System.out.println(result);
		
	} 
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] gems = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			}
		}
		
		int[] costs = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			}
		}
		
		int[] values = new int[N];
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
		}
		int result = 0;
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
			if (values[i] > 0) {
				result += values[i];
			}
		}
		
		System.out.println(result);
		
	} 
} 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[] gems = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				gems[i] = sc.nextInt();
			}
		}
		
		int[] costs = new int[N];
		for (int i = 0; i < N; i++) {
			if (sc.hasNext()) {
				costs[i] = sc.nextInt();
			}
		}
		
		int[] values = new int[N];
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
		}
		int result = 0;
		for (int i = 0; i < N; i++) {
			values[i] = gems[i] - costs[i];
			if (values[i] > 0) {
				result += values[i];
			}
		}
		
		System.out.println(result);
		
	} 
}
