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 total = 0;
        for (int i = 0; i < n; i++) {
            int val = values[i] - sc.nextInt();
            total += val > 0 ? val : 0;
        }

        System.out.println(total);

    }
} 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 total = 0;
        for (int i = 0; i < n; i++) {
            int val = values[i] - sc.nextInt();
            total += val > 0 ? val : 0;
        }

        System.out.println(total);

    }
} 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 total = 0;
        for (int i = 0; i < n; i++) {
            int val = values[i] - sc.nextInt();
            total += val > 0 ? val : 0;
        }

        System.out.println(total);

    } 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 total = 0;
        for (int i = 0; i < n; i++) {
            int val = values[i] - sc.nextInt();
            total += val > 0 ? val : 0;
        }

        System.out.println(total);

    } 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 total = 0; total 0 for (int i = 0; i < n; i++) {
            int val = values[i] - sc.nextInt();
            total += val > 0 ? val : 0;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int val = values[i] - sc.nextInt();
            total += val > 0 ? val : 0;
        } {
            int val = values[i] - sc.nextInt();
            total += val > 0 ? val : 0;
        } int val = values[i] - sc.nextInt(); val values[i] - sc.nextInt() values[i] values i sc.nextInt() sc.nextInt sc total += val > 0 ? val : 0 total val > 0 ? val : 0 val > 0 val 0 val 0 System.out.println(total) System.out.println System.out System System.out total 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 total = 0;
        for (int i = 0; i < n; i++) {
            int val = values[i] - sc.nextInt();
            total += val > 0 ? val : 0;
        }

        System.out.println(total);

    }
} 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 total = 0;
        for (int i = 0; i < n; i++) {
            int val = values[i] - sc.nextInt();
            total += val > 0 ? val : 0;
        }

        System.out.println(total);

    }
} 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 total = 0;
        for (int i = 0; i < n; i++) {
            int val = values[i] - sc.nextInt();
            total += val > 0 ? val : 0;
        }

        System.out.println(total);

    }
}