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

import org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		int[] array = splitInt(sc.nextLine(), " ");
		int[] array2 = splitInt(sc.nextLine(), " ");
		int sum =0;
		for(int i=0;i<n;i++) {
			if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			}
		}
		System.out.println(sum);
	}
	public static int[] splitInt(String str, String split) {
		String[] array = str.split(split);
		int[] array2 = new int[array.length];
	
		for(int i=0; i<array.length; i++) {
				array2[i] = Integer.parseInt(array[i]);
		}
		return array2;
	}
}
 import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util import org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID; ID_ASSIGNMENT_POLICY_ID org.omg.PortableServer public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		int[] array = splitInt(sc.nextLine(), " ");
		int[] array2 = splitInt(sc.nextLine(), " ");
		int sum =0;
		for(int i=0;i<n;i++) {
			if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			}
		}
		System.out.println(sum);
	}
	public static int[] splitInt(String str, String split) {
		String[] array = str.split(split);
		int[] array2 = new int[array.length];
	
		for(int i=0; i<array.length; i++) {
				array2[i] = Integer.parseInt(array[i]);
		}
		return array2;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		int[] array = splitInt(sc.nextLine(), " ");
		int[] array2 = splitInt(sc.nextLine(), " ");
		int sum =0;
		for(int i=0;i<n;i++) {
			if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			}
		}
		System.out.println(sum);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		int[] array = splitInt(sc.nextLine(), " ");
		int[] array2 = splitInt(sc.nextLine(), " ");
		int sum =0;
		for(int i=0;i<n;i++) {
			if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			}
		}
		System.out.println(sum);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int[] array = splitInt(sc.nextLine(), " "); array splitInt(sc.nextLine(), " ") splitInt sc.nextLine() sc.nextLine sc " " int[] array2 = splitInt(sc.nextLine(), " "); array2 splitInt(sc.nextLine(), " ") splitInt sc.nextLine() sc.nextLine sc " " int sum =0; sum 0 for(int i=0;i<n;i++) {
			if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			}
		} {
			if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			}
		} if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			} array[i]>array2[i] array[i] array i array2[i] array2 i {
				sum += array[i]-array2[i];
			} sum += array[i]-array2[i] sum array[i]-array2[i] array[i] array i array2[i] array2 i System.out.println(sum) System.out.println System.out System System.out sum String[] args args public static int[] splitInt(String str, String split) {
		String[] array = str.split(split);
		int[] array2 = new int[array.length];
	
		for(int i=0; i<array.length; i++) {
				array2[i] = Integer.parseInt(array[i]);
		}
		return array2;
	} splitInt {
		String[] array = str.split(split);
		int[] array2 = new int[array.length];
	
		for(int i=0; i<array.length; i++) {
				array2[i] = Integer.parseInt(array[i]);
		}
		return array2;
	} String[] array = str.split(split); array str.split(split) str.split str split int[] array2 = new int[array.length]; array2 new int[array.length] array.length array array.length for(int i=0; i<array.length; i++) {
				array2[i] = Integer.parseInt(array[i]);
		} int i=0; int i=0; i 0 i<array.length i array.length array array.length i++ i++ i {
				array2[i] = Integer.parseInt(array[i]);
		} {
				array2[i] = Integer.parseInt(array[i]);
		} array2[i] = Integer.parseInt(array[i]) array2[i] array2 i Integer.parseInt(array[i]) Integer.parseInt Integer array[i] array i return array2; array2 String str str String split split public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		int[] array = splitInt(sc.nextLine(), " ");
		int[] array2 = splitInt(sc.nextLine(), " ");
		int sum =0;
		for(int i=0;i<n;i++) {
			if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			}
		}
		System.out.println(sum);
	}
	public static int[] splitInt(String str, String split) {
		String[] array = str.split(split);
		int[] array2 = new int[array.length];
	
		for(int i=0; i<array.length; i++) {
				array2[i] = Integer.parseInt(array[i]);
		}
		return array2;
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		int[] array = splitInt(sc.nextLine(), " ");
		int[] array2 = splitInt(sc.nextLine(), " ");
		int sum =0;
		for(int i=0;i<n;i++) {
			if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			}
		}
		System.out.println(sum);
	}
	public static int[] splitInt(String str, String split) {
		String[] array = str.split(split);
		int[] array2 = new int[array.length];
	
		for(int i=0; i<array.length; i++) {
				array2[i] = Integer.parseInt(array[i]);
		}
		return array2;
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

import org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		int[] array = splitInt(sc.nextLine(), " ");
		int[] array2 = splitInt(sc.nextLine(), " ");
		int sum =0;
		for(int i=0;i<n;i++) {
			if(array[i]>array2[i]) {
				sum += array[i]-array2[i];
			}
		}
		System.out.println(sum);
	}
	public static int[] splitInt(String str, String split) {
		String[] array = str.split(split);
		int[] array2 = new int[array.length];
	
		for(int i=0; i<array.length; i++) {
				array2[i] = Integer.parseInt(array[i]);
		}
		return array2;
	}
}

