import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static void main(String arg[]){

        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        int[] ara1 = new int[n];
        int[] ara2 = new int[n];

        ArrayList<Integer> diff = new ArrayList<>();

        for(int i=0;i<n;i++){
            ara1[i] = scanner.nextInt();
        }

        for(int i=0;i<n;i++){
            ara2[i] = scanner.nextInt();
            //diff.add(ara2[i] - ara1[i]);
        }


        int sum=0;

        for(int i=0;i<n;i++){
            if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            }
        }

        prln(sum);


    }

    public static void prln(Object line){
        System.out.println(line);
    }

    public static void pr(Object line){
        System.out.print(line);
    }

} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String arg[]){

        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        int[] ara1 = new int[n];
        int[] ara2 = new int[n];

        ArrayList<Integer> diff = new ArrayList<>();

        for(int i=0;i<n;i++){
            ara1[i] = scanner.nextInt();
        }

        for(int i=0;i<n;i++){
            ara2[i] = scanner.nextInt();
            //diff.add(ara2[i] - ara1[i]);
        }


        int sum=0;

        for(int i=0;i<n;i++){
            if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            }
        }

        prln(sum);


    }

    public static void prln(Object line){
        System.out.println(line);
    }

    public static void pr(Object line){
        System.out.print(line);
    }

} Main public static void main(String arg[]){

        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        int[] ara1 = new int[n];
        int[] ara2 = new int[n];

        ArrayList<Integer> diff = new ArrayList<>();

        for(int i=0;i<n;i++){
            ara1[i] = scanner.nextInt();
        }

        for(int i=0;i<n;i++){
            ara2[i] = scanner.nextInt();
            //diff.add(ara2[i] - ara1[i]);
        }


        int sum=0;

        for(int i=0;i<n;i++){
            if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            }
        }

        prln(sum);


    } main {

        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        int[] ara1 = new int[n];
        int[] ara2 = new int[n];

        ArrayList<Integer> diff = new ArrayList<>();

        for(int i=0;i<n;i++){
            ara1[i] = scanner.nextInt();
        }

        for(int i=0;i<n;i++){
            ara2[i] = scanner.nextInt();
            //diff.add(ara2[i] - ara1[i]);
        }


        int sum=0;

        for(int i=0;i<n;i++){
            if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            }
        }

        prln(sum);


    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int[] ara1 = new int[n]; ara1 new int[n] n int[] ara2 = new int[n]; ara2 new int[n] n ArrayList<Integer> diff = new ArrayList<>(); diff new ArrayList<>() for(int i=0;i<n;i++){
            ara1[i] = scanner.nextInt();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            ara1[i] = scanner.nextInt();
        } {
            ara1[i] = scanner.nextInt();
        } ara1[i] = scanner.nextInt() ara1[i] ara1 i scanner.nextInt() scanner.nextInt scanner for(int i=0;i<n;i++){
            ara2[i] = scanner.nextInt();
            //diff.add(ara2[i] - ara1[i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            ara2[i] = scanner.nextInt();
            //diff.add(ara2[i] - ara1[i]);
        } {
            ara2[i] = scanner.nextInt();
            //diff.add(ara2[i] - ara1[i]);
        } ara2[i] = scanner.nextInt() ara2[i] ara2 i scanner.nextInt() scanner.nextInt scanner int sum=0; sum 0 for(int i=0;i<n;i++){
            if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            }
        } {
            if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            }
        } if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            } ara1[i]>ara2[i] ara1[i] ara1 i ara2[i] ara2 i {
                sum+=ara1[i]-ara2[i];
            } sum+=ara1[i]-ara2[i] sum ara1[i]-ara2[i] ara1[i] ara1 i ara2[i] ara2 i prln(sum) prln sum String arg[] arg public static void prln(Object line){
        System.out.println(line);
    } prln {
        System.out.println(line);
    } System.out.println(line) System.out.println System.out System System.out line Object line line public static void pr(Object line){
        System.out.print(line);
    } pr {
        System.out.print(line);
    } System.out.print(line) System.out.print System.out System System.out line Object line line public class Main {

    public static void main(String arg[]){

        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        int[] ara1 = new int[n];
        int[] ara2 = new int[n];

        ArrayList<Integer> diff = new ArrayList<>();

        for(int i=0;i<n;i++){
            ara1[i] = scanner.nextInt();
        }

        for(int i=0;i<n;i++){
            ara2[i] = scanner.nextInt();
            //diff.add(ara2[i] - ara1[i]);
        }


        int sum=0;

        for(int i=0;i<n;i++){
            if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            }
        }

        prln(sum);


    }

    public static void prln(Object line){
        System.out.println(line);
    }

    public static void pr(Object line){
        System.out.print(line);
    }

} public class Main {

    public static void main(String arg[]){

        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        int[] ara1 = new int[n];
        int[] ara2 = new int[n];

        ArrayList<Integer> diff = new ArrayList<>();

        for(int i=0;i<n;i++){
            ara1[i] = scanner.nextInt();
        }

        for(int i=0;i<n;i++){
            ara2[i] = scanner.nextInt();
            //diff.add(ara2[i] - ara1[i]);
        }


        int sum=0;

        for(int i=0;i<n;i++){
            if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            }
        }

        prln(sum);


    }

    public static void prln(Object line){
        System.out.println(line);
    }

    public static void pr(Object line){
        System.out.print(line);
    }

} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static void main(String arg[]){

        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        int[] ara1 = new int[n];
        int[] ara2 = new int[n];

        ArrayList<Integer> diff = new ArrayList<>();

        for(int i=0;i<n;i++){
            ara1[i] = scanner.nextInt();
        }

        for(int i=0;i<n;i++){
            ara2[i] = scanner.nextInt();
            //diff.add(ara2[i] - ara1[i]);
        }


        int sum=0;

        for(int i=0;i<n;i++){
            if(ara1[i]>ara2[i]){
                sum+=ara1[i]-ara2[i];
            }
        }

        prln(sum);


    }

    public static void prln(Object line){
        System.out.println(line);
    }

    public static void pr(Object line){
        System.out.print(line);
    }

}
