import java.util.*;
import java.util.Arrays;
import java.util.Collections;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Integer[] x = new Integer[n];
        Integer[] y = new Integer[n];
        Integer[] xy = new Integer[n];
        
        for(int i = 0; i < n; i++){
            x[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            y[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            xy[i] = x[i] - y[i];
        }
        Arrays.sort(xy, Collections.reverseOrder());
        int counter = 0;
        
        for(int i = 0; i < n; i++){
            if(xy[i] > 0){
                counter++;
            }else{
                
            }
        }
        int kekka = 0;
        for(int i = 0; i < counter; i++){
            kekka += xy[i];
        }
        
        System.out.println(kekka);
    }
} import java.util.*; util.* java import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Integer[] x = new Integer[n];
        Integer[] y = new Integer[n];
        Integer[] xy = new Integer[n];
        
        for(int i = 0; i < n; i++){
            x[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            y[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            xy[i] = x[i] - y[i];
        }
        Arrays.sort(xy, Collections.reverseOrder());
        int counter = 0;
        
        for(int i = 0; i < n; i++){
            if(xy[i] > 0){
                counter++;
            }else{
                
            }
        }
        int kekka = 0;
        for(int i = 0; i < counter; i++){
            kekka += xy[i];
        }
        
        System.out.println(kekka);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Integer[] x = new Integer[n];
        Integer[] y = new Integer[n];
        Integer[] xy = new Integer[n];
        
        for(int i = 0; i < n; i++){
            x[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            y[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            xy[i] = x[i] - y[i];
        }
        Arrays.sort(xy, Collections.reverseOrder());
        int counter = 0;
        
        for(int i = 0; i < n; i++){
            if(xy[i] > 0){
                counter++;
            }else{
                
            }
        }
        int kekka = 0;
        for(int i = 0; i < counter; i++){
            kekka += xy[i];
        }
        
        System.out.println(kekka);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Integer[] x = new Integer[n];
        Integer[] y = new Integer[n];
        Integer[] xy = new Integer[n];
        
        for(int i = 0; i < n; i++){
            x[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            y[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            xy[i] = x[i] - y[i];
        }
        Arrays.sort(xy, Collections.reverseOrder());
        int counter = 0;
        
        for(int i = 0; i < n; i++){
            if(xy[i] > 0){
                counter++;
            }else{
                
            }
        }
        int kekka = 0;
        for(int i = 0; i < counter; i++){
            kekka += xy[i];
        }
        
        System.out.println(kekka);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Integer[] x = new Integer[n]; x new Integer[n] n Integer[] y = new Integer[n]; y new Integer[n] n Integer[] xy = new Integer[n]; xy new Integer[n] n for(int i = 0; i < n; i++){
            x[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            x[i] = sc.nextInt();
        } {
            x[i] = sc.nextInt();
        } x[i] = sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i++){
            y[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            y[i] = sc.nextInt();
        } {
            y[i] = sc.nextInt();
        } y[i] = sc.nextInt() y[i] y i sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i++){
            xy[i] = x[i] - y[i];
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            xy[i] = x[i] - y[i];
        } {
            xy[i] = x[i] - y[i];
        } xy[i] = x[i] - y[i] xy[i] xy i x[i] - y[i] x[i] x i y[i] y i Arrays.sort(xy, Collections.reverseOrder()) Arrays.sort Arrays xy Collections.reverseOrder() Collections.reverseOrder Collections int counter = 0; counter 0 for(int i = 0; i < n; i++){
            if(xy[i] > 0){
                counter++;
            }else{
                
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if(xy[i] > 0){
                counter++;
            }else{
                
            }
        } {
            if(xy[i] > 0){
                counter++;
            }else{
                
            }
        } if(xy[i] > 0){
                counter++;
            }else{
                
            } xy[i] > 0 xy[i] xy i 0 {
                counter++;
            } counter++ counter {
                
            } int kekka = 0; kekka 0 for(int i = 0; i < counter; i++){
            kekka += xy[i];
        } int i = 0; int i = 0; i 0 i < counter i counter i++ i++ i {
            kekka += xy[i];
        } {
            kekka += xy[i];
        } kekka += xy[i] kekka xy[i] xy i System.out.println(kekka) System.out.println System.out System System.out kekka String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Integer[] x = new Integer[n];
        Integer[] y = new Integer[n];
        Integer[] xy = new Integer[n];
        
        for(int i = 0; i < n; i++){
            x[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            y[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            xy[i] = x[i] - y[i];
        }
        Arrays.sort(xy, Collections.reverseOrder());
        int counter = 0;
        
        for(int i = 0; i < n; i++){
            if(xy[i] > 0){
                counter++;
            }else{
                
            }
        }
        int kekka = 0;
        for(int i = 0; i < counter; i++){
            kekka += xy[i];
        }
        
        System.out.println(kekka);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Integer[] x = new Integer[n];
        Integer[] y = new Integer[n];
        Integer[] xy = new Integer[n];
        
        for(int i = 0; i < n; i++){
            x[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            y[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            xy[i] = x[i] - y[i];
        }
        Arrays.sort(xy, Collections.reverseOrder());
        int counter = 0;
        
        for(int i = 0; i < n; i++){
            if(xy[i] > 0){
                counter++;
            }else{
                
            }
        }
        int kekka = 0;
        for(int i = 0; i < counter; i++){
            kekka += xy[i];
        }
        
        System.out.println(kekka);
    }
} Main
import java.util.*;
import java.util.Arrays;
import java.util.Collections;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Integer[] x = new Integer[n];
        Integer[] y = new Integer[n];
        Integer[] xy = new Integer[n];
        
        for(int i = 0; i < n; i++){
            x[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            y[i] = sc.nextInt();
        }
         for(int i = 0; i < n; i++){
            xy[i] = x[i] - y[i];
        }
        Arrays.sort(xy, Collections.reverseOrder());
        int counter = 0;
        
        for(int i = 0; i < n; i++){
            if(xy[i] > 0){
                counter++;
            }else{
                
            }
        }
        int kekka = 0;
        for(int i = 0; i < counter; i++){
            kekka += xy[i];
        }
        
        System.out.println(kekka);
    }
}
