import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] v = new int[n];
		Integer[] r = new Integer[n];
		int sum=0;
		for (int i = 0; i < n; i++) {
			v[i]=scn.nextInt();
		}
		for (int i = 0; i < n; i++) {
			r[i] = v[i] - scn.nextInt();
		}
		Arrays.sort(r,Comparator.reverseOrder());
		for(int i=0;i<n;i++) {
			if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			}
		}
		System.out.println(sum);
	}
} import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] v = new int[n];
		Integer[] r = new Integer[n];
		int sum=0;
		for (int i = 0; i < n; i++) {
			v[i]=scn.nextInt();
		}
		for (int i = 0; i < n; i++) {
			r[i] = v[i] - scn.nextInt();
		}
		Arrays.sort(r,Comparator.reverseOrder());
		for(int i=0;i<n;i++) {
			if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			}
		}
		System.out.println(sum);
	}
} Main public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] v = new int[n];
		Integer[] r = new Integer[n];
		int sum=0;
		for (int i = 0; i < n; i++) {
			v[i]=scn.nextInt();
		}
		for (int i = 0; i < n; i++) {
			r[i] = v[i] - scn.nextInt();
		}
		Arrays.sort(r,Comparator.reverseOrder());
		for(int i=0;i<n;i++) {
			if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			}
		}
		System.out.println(sum);
	} main {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] v = new int[n];
		Integer[] r = new Integer[n];
		int sum=0;
		for (int i = 0; i < n; i++) {
			v[i]=scn.nextInt();
		}
		for (int i = 0; i < n; i++) {
			r[i] = v[i] - scn.nextInt();
		}
		Arrays.sort(r,Comparator.reverseOrder());
		for(int i=0;i<n;i++) {
			if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			}
		}
		System.out.println(sum);
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int n = scn.nextInt(); n scn.nextInt() scn.nextInt scn int[] v = new int[n]; v new int[n] n Integer[] r = new Integer[n]; r new Integer[n] n int sum=0; sum 0 for (int i = 0; i < n; i++) {
			v[i]=scn.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			v[i]=scn.nextInt();
		} {
			v[i]=scn.nextInt();
		} v[i]=scn.nextInt() v[i] v i scn.nextInt() scn.nextInt scn for (int i = 0; i < n; i++) {
			r[i] = v[i] - scn.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			r[i] = v[i] - scn.nextInt();
		} {
			r[i] = v[i] - scn.nextInt();
		} r[i] = v[i] - scn.nextInt() r[i] r i v[i] - scn.nextInt() v[i] v i scn.nextInt() scn.nextInt scn Arrays.sort(r,Comparator.reverseOrder()) Arrays.sort Arrays r Comparator.reverseOrder() Comparator.reverseOrder Comparator for(int i=0;i<n;i++) {
			if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			}
		} {
			if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			}
		} if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			} r[i]>0 r[i] r i 0 {
				sum+=r[i];
			} sum+=r[i] sum r[i] r i {
				break;
			} break; System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] v = new int[n];
		Integer[] r = new Integer[n];
		int sum=0;
		for (int i = 0; i < n; i++) {
			v[i]=scn.nextInt();
		}
		for (int i = 0; i < n; i++) {
			r[i] = v[i] - scn.nextInt();
		}
		Arrays.sort(r,Comparator.reverseOrder());
		for(int i=0;i<n;i++) {
			if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			}
		}
		System.out.println(sum);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] v = new int[n];
		Integer[] r = new Integer[n];
		int sum=0;
		for (int i = 0; i < n; i++) {
			v[i]=scn.nextInt();
		}
		for (int i = 0; i < n; i++) {
			r[i] = v[i] - scn.nextInt();
		}
		Arrays.sort(r,Comparator.reverseOrder());
		for(int i=0;i<n;i++) {
			if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			}
		}
		System.out.println(sum);
	}
} Main
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] v = new int[n];
		Integer[] r = new Integer[n];
		int sum=0;
		for (int i = 0; i < n; i++) {
			v[i]=scn.nextInt();
		}
		for (int i = 0; i < n; i++) {
			r[i] = v[i] - scn.nextInt();
		}
		Arrays.sort(r,Comparator.reverseOrder());
		for(int i=0;i<n;i++) {
			if(r[i]>0) {
				sum+=r[i];
			}else {
				break;
			}
		}
		System.out.println(sum);
	}
}