import java.util.Scanner;

public class Main {
public static void main(String[] args) {

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

			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int[] values = new int[n];
			for (int i = 0; i < n; i++)
			{
				values[i] = sc.nextInt();
			}
			int[] costs = new int[n];
			for (int i = 0; i < n; i++)
			{
				costs[i] = sc.nextInt();
			}
			int sum = 0;
			for (int i = 0; i < n; i++)
			{
				if(values[i] >= costs[i])
				{
					int value = values[i] - costs[i];
					sum += value;
				}else
				{
				}
			}
			System.out.println(sum);
		} main {

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

			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int[] values = new int[n];
			for (int i = 0; i < n; i++)
			{
				values[i] = sc.nextInt();
			}
			int[] costs = new int[n];
			for (int i = 0; i < n; i++)
			{
				costs[i] = sc.nextInt();
			}
			int sum = 0;
			for (int i = 0; i < n; i++)
			{
				if(values[i] >= costs[i])
				{
					int value = values[i] - costs[i];
					sum += value;
				}else
				{
				}
			}
			System.out.println(sum);
		}
	} 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[] values = new int[n];
			for (int i = 0; i < n; i++)
			{
				values[i] = sc.nextInt();
			}
			int[] costs = new int[n];
			for (int i = 0; i < n; i++)
			{
				costs[i] = sc.nextInt();
			}
			int sum = 0;
			for (int i = 0; i < n; i++)
			{
				if(values[i] >= costs[i])
				{
					int value = values[i] - costs[i];
					sum += value;
				}else
				{
				}
			}
			System.out.println(sum);
		}
	}
