import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] va = new int[n];
        int[] ca = new int[n];
        for(int i=0; i<n; i++){
            va[i] = sc.nextInt();
        }
        for(int i=0; i<n; i++){
            ca[i] = sc.nextInt();
        }
        sc.close();

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

        int total = 0;
        for (int i=0; i<n; i++){
            total += va[i] > ca[i] ? va[i] - ca[i] : 0 ;
        }
        System.out.println(total);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] va = new int[n];
        int[] ca = new int[n];
        for(int i=0; i<n; i++){
            va[i] = sc.nextInt();
        }
        for(int i=0; i<n; i++){
            ca[i] = sc.nextInt();
        }
        sc.close();

        int total = 0;
        for (int i=0; i<n; i++){
            total += va[i] > ca[i] ? va[i] - ca[i] : 0 ;
        }
        System.out.println(total);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] va = new int[n];
        int[] ca = new int[n];
        for(int i=0; i<n; i++){
            va[i] = sc.nextInt();
        }
        for(int i=0; i<n; i++){
            ca[i] = sc.nextInt();
        }
        sc.close();

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

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

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

        int total = 0;
        for (int i=0; i<n; i++){
            total += va[i] > ca[i] ? va[i] - ca[i] : 0 ;
        }
        System.out.println(total);
    }
}
