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);
    }

}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz