import java.util.Scanner;

class Main {
    public static void main(String []args){
        Scanner in = new Scanner (System.in);
        int n = in.nextInt ();
        int[] arr = new int[n];
        int[] brr = new int[n];
        for(int i=0;i<n;i++){
            arr[i] = in.nextInt();
        }
        for(int i=0;i<n;i++){
            brr[i] = in.nextInt();
        }
        int max=0;
        for(int i=0;i<n;i++){
            if(arr[i]>brr[i])
                max+= arr[i]-brr[i];
        }
        System.out.println(max);

    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String []args){
        Scanner in = new Scanner (System.in);
        int n = in.nextInt ();
        int[] arr = new int[n];
        int[] brr = new int[n];
        for(int i=0;i<n;i++){
            arr[i] = in.nextInt();
        }
        for(int i=0;i<n;i++){
            brr[i] = in.nextInt();
        }
        int max=0;
        for(int i=0;i<n;i++){
            if(arr[i]>brr[i])
                max+= arr[i]-brr[i];
        }
        System.out.println(max);

    }
} Main public static void main(String []args){
        Scanner in = new Scanner (System.in);
        int n = in.nextInt ();
        int[] arr = new int[n];
        int[] brr = new int[n];
        for(int i=0;i<n;i++){
            arr[i] = in.nextInt();
        }
        for(int i=0;i<n;i++){
            brr[i] = in.nextInt();
        }
        int max=0;
        for(int i=0;i<n;i++){
            if(arr[i]>brr[i])
                max+= arr[i]-brr[i];
        }
        System.out.println(max);

    } main {
        Scanner in = new Scanner (System.in);
        int n = in.nextInt ();
        int[] arr = new int[n];
        int[] brr = new int[n];
        for(int i=0;i<n;i++){
            arr[i] = in.nextInt();
        }
        for(int i=0;i<n;i++){
            brr[i] = in.nextInt();
        }
        int max=0;
        for(int i=0;i<n;i++){
            if(arr[i]>brr[i])
                max+= arr[i]-brr[i];
        }
        System.out.println(max);

    } Scanner in = new Scanner (System.in); in new Scanner (System.in) int n = in.nextInt (); n in.nextInt () in.nextInt in int[] arr = new int[n]; arr new int[n] n int[] brr = new int[n]; brr new int[n] n for(int i=0;i<n;i++){
            arr[i] = in.nextInt();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            arr[i] = in.nextInt();
        } {
            arr[i] = in.nextInt();
        } arr[i] = in.nextInt() arr[i] arr i in.nextInt() in.nextInt in for(int i=0;i<n;i++){
            brr[i] = in.nextInt();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            brr[i] = in.nextInt();
        } {
            brr[i] = in.nextInt();
        } brr[i] = in.nextInt() brr[i] brr i in.nextInt() in.nextInt in int max=0; max 0 for(int i=0;i<n;i++){
            if(arr[i]>brr[i])
                max+= arr[i]-brr[i];
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            if(arr[i]>brr[i])
                max+= arr[i]-brr[i];
        } {
            if(arr[i]>brr[i])
                max+= arr[i]-brr[i];
        } if(arr[i]>brr[i])
                max+= arr[i]-brr[i]; arr[i]>brr[i] arr[i] arr i brr[i] brr i max+= arr[i]-brr[i] max arr[i]-brr[i] arr[i] arr i brr[i] brr i System.out.println(max) System.out.println System.out System System.out max String []args args
import java.util.Scanner;

class Main {
    public static void main(String []args){
        Scanner in = new Scanner (System.in);
        int n = in.nextInt ();
        int[] arr = new int[n];
        int[] brr = new int[n];
        for(int i=0;i<n;i++){
            arr[i] = in.nextInt();
        }
        for(int i=0;i<n;i++){
            brr[i] = in.nextInt();
        }
        int max=0;
        for(int i=0;i<n;i++){
            if(arr[i]>brr[i])
                max+= arr[i]-brr[i];
        }
        System.out.println(max);

    }
}