import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int sum = 0; int[] v = new int[n]; int[] c = new int[n];
		for(int i = 0; i < n; i++) v[i] = Integer.parseInt(sc.next());
		for(int i = 0; i < n; i++) {
			int a = Integer.parseInt(sc.next());
			if(a < v[i]) sum += v[i] - a;
		}
		System.out.println(sum);
		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 sum = 0; int[] v = new int[n]; int[] c = new int[n];
		for(int i = 0; i < n; i++) v[i] = Integer.parseInt(sc.next());
		for(int i = 0; i < n; i++) {
			int a = Integer.parseInt(sc.next());
			if(a < v[i]) sum += v[i] - a;
		}
		System.out.println(sum);
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int sum = 0; int[] v = new int[n]; int[] c = new int[n];
		for(int i = 0; i < n; i++) v[i] = Integer.parseInt(sc.next());
		for(int i = 0; i < n; i++) {
			int a = Integer.parseInt(sc.next());
			if(a < v[i]) sum += v[i] - a;
		}
		System.out.println(sum);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int sum = 0; int[] v = new int[n]; int[] c = new int[n];
		for(int i = 0; i < n; i++) v[i] = Integer.parseInt(sc.next());
		for(int i = 0; i < n; i++) {
			int a = Integer.parseInt(sc.next());
			if(a < v[i]) sum += v[i] - a;
		}
		System.out.println(sum);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int sum = 0; sum 0 int[] v = new int[n]; v new int[n] n int[] c = new int[n]; c new int[n] n for(int i = 0; i < n; i++) v[i] = Integer.parseInt(sc.next()); int i = 0; int i = 0; i 0 i < n i n i++ i++ i v[i] = Integer.parseInt(sc.next()); v[i] = Integer.parseInt(sc.next()) v[i] v i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for(int i = 0; i < n; i++) {
			int a = Integer.parseInt(sc.next());
			if(a < v[i]) sum += v[i] - a;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int a = Integer.parseInt(sc.next());
			if(a < v[i]) sum += v[i] - a;
		} {
			int a = Integer.parseInt(sc.next());
			if(a < v[i]) sum += v[i] - a;
		} int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(a < v[i]) sum += v[i] - a; a < v[i] a v[i] v i sum += v[i] - a sum v[i] - a v[i] v i a System.out.println(sum) System.out.println System.out System System.out sum 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 sum = 0; int[] v = new int[n]; int[] c = new int[n];
		for(int i = 0; i < n; i++) v[i] = Integer.parseInt(sc.next());
		for(int i = 0; i < n; i++) {
			int a = Integer.parseInt(sc.next());
			if(a < v[i]) sum += v[i] - a;
		}
		System.out.println(sum);
		sc.close();
	}
} public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int sum = 0; int[] v = new int[n]; int[] c = new int[n];
		for(int i = 0; i < n; i++) v[i] = Integer.parseInt(sc.next());
		for(int i = 0; i < n; i++) {
			int a = Integer.parseInt(sc.next());
			if(a < v[i]) sum += v[i] - a;
		}
		System.out.println(sum);
		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 sum = 0; int[] v = new int[n]; int[] c = new int[n];
		for(int i = 0; i < n; i++) v[i] = Integer.parseInt(sc.next());
		for(int i = 0; i < n; i++) {
			int a = Integer.parseInt(sc.next());
			if(a < v[i]) sum += v[i] - a;
		}
		System.out.println(sum);
		sc.close();
	}
}