import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            a.add(tmp);
        }
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            b.add(tmp);
        }
        int ret = 0;
        for (int i = 0; i < n; i++) {
            if (a.get(i) > b.get(i)) ret += a.get(i) - b.get(i);
        }
        System.out.println(ret);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            a.add(tmp);
        }
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            b.add(tmp);
        }
        int ret = 0;
        for (int i = 0; i < n; i++) {
            if (a.get(i) > b.get(i)) ret += a.get(i) - b.get(i);
        }
        System.out.println(ret);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            a.add(tmp);
        }
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            b.add(tmp);
        }
        int ret = 0;
        for (int i = 0; i < n; i++) {
            if (a.get(i) > b.get(i)) ret += a.get(i) - b.get(i);
        }
        System.out.println(ret);
    } main {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            a.add(tmp);
        }
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            b.add(tmp);
        }
        int ret = 0;
        for (int i = 0; i < n; i++) {
            if (a.get(i) > b.get(i)) ret += a.get(i) - b.get(i);
        }
        System.out.println(ret);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> a = new ArrayList<>(); a new ArrayList<>() ArrayList<Integer> b = new ArrayList<>(); b new ArrayList<>() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            a.add(tmp);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int tmp = sc.nextInt();
            a.add(tmp);
        } {
            int tmp = sc.nextInt();
            a.add(tmp);
        } int tmp = sc.nextInt(); tmp sc.nextInt() sc.nextInt sc a.add(tmp) a.add a tmp for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            b.add(tmp);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int tmp = sc.nextInt();
            b.add(tmp);
        } {
            int tmp = sc.nextInt();
            b.add(tmp);
        } int tmp = sc.nextInt(); tmp sc.nextInt() sc.nextInt sc b.add(tmp) b.add b tmp int ret = 0; ret 0 for (int i = 0; i < n; i++) {
            if (a.get(i) > b.get(i)) ret += a.get(i) - b.get(i);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (a.get(i) > b.get(i)) ret += a.get(i) - b.get(i);
        } {
            if (a.get(i) > b.get(i)) ret += a.get(i) - b.get(i);
        } if (a.get(i) > b.get(i)) ret += a.get(i) - b.get(i); a.get(i) > b.get(i) a.get(i) a.get a i b.get(i) b.get b i ret += a.get(i) - b.get(i) ret a.get(i) - b.get(i) a.get(i) a.get a i b.get(i) b.get b i System.out.println(ret) System.out.println System.out System System.out ret String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            a.add(tmp);
        }
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            b.add(tmp);
        }
        int ret = 0;
        for (int i = 0; i < n; i++) {
            if (a.get(i) > b.get(i)) ret += a.get(i) - b.get(i);
        }
        System.out.println(ret);
    }
}
