import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = Integer.parseInt(sc.nextLine());
        String valueStr = sc.nextLine();
        int[] values = changeStrToNums(valueStr, number);
        String costStr = sc.nextLine();
        int[] costs = changeStrToNums(costStr, number);

        int max = 0;
        for (int i = 0; i < number; i++) {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        }
        System.out.print(max);
    }

    private static int[] changeStrToNums (String input, int count) {
        String[] numStrs = input.split(" ");
        int[] nums = new int[count];
        for (int i = 0; i < count; i++) {
            nums[i] = Integer.parseInt(numStrs[i]);
        }
        return nums;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = Integer.parseInt(sc.nextLine());
        String valueStr = sc.nextLine();
        int[] values = changeStrToNums(valueStr, number);
        String costStr = sc.nextLine();
        int[] costs = changeStrToNums(costStr, number);

        int max = 0;
        for (int i = 0; i < number; i++) {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        }
        System.out.print(max);
    }

    private static int[] changeStrToNums (String input, int count) {
        String[] numStrs = input.split(" ");
        int[] nums = new int[count];
        for (int i = 0; i < count; i++) {
            nums[i] = Integer.parseInt(numStrs[i]);
        }
        return nums;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = Integer.parseInt(sc.nextLine());
        String valueStr = sc.nextLine();
        int[] values = changeStrToNums(valueStr, number);
        String costStr = sc.nextLine();
        int[] costs = changeStrToNums(costStr, number);

        int max = 0;
        for (int i = 0; i < number; i++) {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        }
        System.out.print(max);
    } main {
        Scanner sc = new Scanner(System.in);
        int number = Integer.parseInt(sc.nextLine());
        String valueStr = sc.nextLine();
        int[] values = changeStrToNums(valueStr, number);
        String costStr = sc.nextLine();
        int[] costs = changeStrToNums(costStr, number);

        int max = 0;
        for (int i = 0; i < number; i++) {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        }
        System.out.print(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int number = Integer.parseInt(sc.nextLine()); number Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc String valueStr = sc.nextLine(); valueStr sc.nextLine() sc.nextLine sc int[] values = changeStrToNums(valueStr, number); values changeStrToNums(valueStr, number) changeStrToNums valueStr number String costStr = sc.nextLine(); costStr sc.nextLine() sc.nextLine sc int[] costs = changeStrToNums(costStr, number); costs changeStrToNums(costStr, number) changeStrToNums costStr number int max = 0; max 0 for (int i = 0; i < number; i++) {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        } int i = 0; int i = 0; i 0 i < number i number i++ i++ i {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        } {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        } int diff = values[i] - costs[i]; diff values[i] - costs[i] values[i] values i costs[i] costs i if (diff > 0) {
                max += diff;
            } diff > 0 diff 0 {
                max += diff;
            } max += diff max diff System.out.print(max) System.out.print System.out System System.out max String[] args args private static int[] changeStrToNums (String input, int count) {
        String[] numStrs = input.split(" ");
        int[] nums = new int[count];
        for (int i = 0; i < count; i++) {
            nums[i] = Integer.parseInt(numStrs[i]);
        }
        return nums;
    } changeStrToNums {
        String[] numStrs = input.split(" ");
        int[] nums = new int[count];
        for (int i = 0; i < count; i++) {
            nums[i] = Integer.parseInt(numStrs[i]);
        }
        return nums;
    } String[] numStrs = input.split(" "); numStrs input.split(" ") input.split input " " int[] nums = new int[count]; nums new int[count] count for (int i = 0; i < count; i++) {
            nums[i] = Integer.parseInt(numStrs[i]);
        } int i = 0; int i = 0; i 0 i < count i count i++ i++ i {
            nums[i] = Integer.parseInt(numStrs[i]);
        } {
            nums[i] = Integer.parseInt(numStrs[i]);
        } nums[i] = Integer.parseInt(numStrs[i]) nums[i] nums i Integer.parseInt(numStrs[i]) Integer.parseInt Integer numStrs[i] numStrs i return nums; nums String input input int count count public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = Integer.parseInt(sc.nextLine());
        String valueStr = sc.nextLine();
        int[] values = changeStrToNums(valueStr, number);
        String costStr = sc.nextLine();
        int[] costs = changeStrToNums(costStr, number);

        int max = 0;
        for (int i = 0; i < number; i++) {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        }
        System.out.print(max);
    }

    private static int[] changeStrToNums (String input, int count) {
        String[] numStrs = input.split(" ");
        int[] nums = new int[count];
        for (int i = 0; i < count; i++) {
            nums[i] = Integer.parseInt(numStrs[i]);
        }
        return nums;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = Integer.parseInt(sc.nextLine());
        String valueStr = sc.nextLine();
        int[] values = changeStrToNums(valueStr, number);
        String costStr = sc.nextLine();
        int[] costs = changeStrToNums(costStr, number);

        int max = 0;
        for (int i = 0; i < number; i++) {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        }
        System.out.print(max);
    }

    private static int[] changeStrToNums (String input, int count) {
        String[] numStrs = input.split(" ");
        int[] nums = new int[count];
        for (int i = 0; i < count; i++) {
            nums[i] = Integer.parseInt(numStrs[i]);
        }
        return nums;
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = Integer.parseInt(sc.nextLine());
        String valueStr = sc.nextLine();
        int[] values = changeStrToNums(valueStr, number);
        String costStr = sc.nextLine();
        int[] costs = changeStrToNums(costStr, number);

        int max = 0;
        for (int i = 0; i < number; i++) {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        }
        System.out.print(max);
    }

    private static int[] changeStrToNums (String input, int count) {
        String[] numStrs = input.split(" ");
        int[] nums = new int[count];
        for (int i = 0; i < count; i++) {
            nums[i] = Integer.parseInt(numStrs[i]);
        }
        return nums;
    }
}
