import java.util.*;
class Main{
  	public static void main(String arts[]){
      	Scanner sc =  new Scanner(System.in);
      	int X = 0;
      	int Y = 0;
      	int Rls = 0;
      	int N = sc.nextInt();
      	sc.nextLine();
      	String Vlist = sc.nextLine();
      	String[] Vs = Vlist.split(" ");
      	int[] V = new int[Vs.length];
        for(int n = 0;n < V.length;n++){
          	V[n] = Integer.parseInt(Vs[n]); 
        }
      	String Clist = sc.nextLine();
      	String[] Cs = Clist.split(" ");
      	int[] C = new int[Cs.length];
      	for(int n = 0;n < C.length;n++){
          	C[n] = Integer.parseInt(Cs[n]);
        }
      	int[] D = new int[C.length];
      	for(int x = 0;x < D.length;x++){
          	D[x] = V[x] - C[x];
        }
      	Arrays.sort(D);
      	for(int n = C.length-1;n>=0;n--){
          if(D[n]<=0){
            	break;
          }
          Rls = Rls + D[n];
        }
      	System.out.println(Rls);
    }
}
              	 import java.util.*; util.* java class Main{
  	public static void main(String arts[]){
      	Scanner sc =  new Scanner(System.in);
      	int X = 0;
      	int Y = 0;
      	int Rls = 0;
      	int N = sc.nextInt();
      	sc.nextLine();
      	String Vlist = sc.nextLine();
      	String[] Vs = Vlist.split(" ");
      	int[] V = new int[Vs.length];
        for(int n = 0;n < V.length;n++){
          	V[n] = Integer.parseInt(Vs[n]); 
        }
      	String Clist = sc.nextLine();
      	String[] Cs = Clist.split(" ");
      	int[] C = new int[Cs.length];
      	for(int n = 0;n < C.length;n++){
          	C[n] = Integer.parseInt(Cs[n]);
        }
      	int[] D = new int[C.length];
      	for(int x = 0;x < D.length;x++){
          	D[x] = V[x] - C[x];
        }
      	Arrays.sort(D);
      	for(int n = C.length-1;n>=0;n--){
          if(D[n]<=0){
            	break;
          }
          Rls = Rls + D[n];
        }
      	System.out.println(Rls);
    }
} Main public static void main(String arts[]){
      	Scanner sc =  new Scanner(System.in);
      	int X = 0;
      	int Y = 0;
      	int Rls = 0;
      	int N = sc.nextInt();
      	sc.nextLine();
      	String Vlist = sc.nextLine();
      	String[] Vs = Vlist.split(" ");
      	int[] V = new int[Vs.length];
        for(int n = 0;n < V.length;n++){
          	V[n] = Integer.parseInt(Vs[n]); 
        }
      	String Clist = sc.nextLine();
      	String[] Cs = Clist.split(" ");
      	int[] C = new int[Cs.length];
      	for(int n = 0;n < C.length;n++){
          	C[n] = Integer.parseInt(Cs[n]);
        }
      	int[] D = new int[C.length];
      	for(int x = 0;x < D.length;x++){
          	D[x] = V[x] - C[x];
        }
      	Arrays.sort(D);
      	for(int n = C.length-1;n>=0;n--){
          if(D[n]<=0){
            	break;
          }
          Rls = Rls + D[n];
        }
      	System.out.println(Rls);
    } main {
      	Scanner sc =  new Scanner(System.in);
      	int X = 0;
      	int Y = 0;
      	int Rls = 0;
      	int N = sc.nextInt();
      	sc.nextLine();
      	String Vlist = sc.nextLine();
      	String[] Vs = Vlist.split(" ");
      	int[] V = new int[Vs.length];
        for(int n = 0;n < V.length;n++){
          	V[n] = Integer.parseInt(Vs[n]); 
        }
      	String Clist = sc.nextLine();
      	String[] Cs = Clist.split(" ");
      	int[] C = new int[Cs.length];
      	for(int n = 0;n < C.length;n++){
          	C[n] = Integer.parseInt(Cs[n]);
        }
      	int[] D = new int[C.length];
      	for(int x = 0;x < D.length;x++){
          	D[x] = V[x] - C[x];
        }
      	Arrays.sort(D);
      	for(int n = C.length-1;n>=0;n--){
          if(D[n]<=0){
            	break;
          }
          Rls = Rls + D[n];
        }
      	System.out.println(Rls);
    } Scanner sc =  new Scanner(System.in); sc new Scanner(System.in) int X = 0; X 0 int Y = 0; Y 0 int Rls = 0; Rls 0 int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc String Vlist = sc.nextLine(); Vlist sc.nextLine() sc.nextLine sc String[] Vs = Vlist.split(" "); Vs Vlist.split(" ") Vlist.split Vlist " " int[] V = new int[Vs.length]; V new int[Vs.length] Vs.length Vs Vs.length for(int n = 0;n < V.length;n++){
          	V[n] = Integer.parseInt(Vs[n]); 
        } int n = 0; int n = 0; n 0 n < V.length n V.length V V.length n++ n++ n {
          	V[n] = Integer.parseInt(Vs[n]); 
        } {
          	V[n] = Integer.parseInt(Vs[n]); 
        } V[n] = Integer.parseInt(Vs[n]) V[n] V n Integer.parseInt(Vs[n]) Integer.parseInt Integer Vs[n] Vs n String Clist = sc.nextLine(); Clist sc.nextLine() sc.nextLine sc String[] Cs = Clist.split(" "); Cs Clist.split(" ") Clist.split Clist " " int[] C = new int[Cs.length]; C new int[Cs.length] Cs.length Cs Cs.length for(int n = 0;n < C.length;n++){
          	C[n] = Integer.parseInt(Cs[n]);
        } int n = 0; int n = 0; n 0 n < C.length n C.length C C.length n++ n++ n {
          	C[n] = Integer.parseInt(Cs[n]);
        } {
          	C[n] = Integer.parseInt(Cs[n]);
        } C[n] = Integer.parseInt(Cs[n]) C[n] C n Integer.parseInt(Cs[n]) Integer.parseInt Integer Cs[n] Cs n int[] D = new int[C.length]; D new int[C.length] C.length C C.length for(int x = 0;x < D.length;x++){
          	D[x] = V[x] - C[x];
        } int x = 0; int x = 0; x 0 x < D.length x D.length D D.length x++ x++ x {
          	D[x] = V[x] - C[x];
        } {
          	D[x] = V[x] - C[x];
        } D[x] = V[x] - C[x] D[x] D x V[x] - C[x] V[x] V x C[x] C x Arrays.sort(D) Arrays.sort Arrays D for(int n = C.length-1;n>=0;n--){
          if(D[n]<=0){
            	break;
          }
          Rls = Rls + D[n];
        } int n = C.length-1; int n = C.length-1; n C.length-1 C.length C C.length 1 n>=0 n 0 n-- n-- n {
          if(D[n]<=0){
            	break;
          }
          Rls = Rls + D[n];
        } {
          if(D[n]<=0){
            	break;
          }
          Rls = Rls + D[n];
        } if(D[n]<=0){
            	break;
          } D[n]<=0 D[n] D n 0 {
            	break;
          } break; Rls = Rls + D[n] Rls Rls + D[n] Rls D[n] D n System.out.println(Rls) System.out.println System.out System System.out Rls String arts[] arts
import java.util.*;
class Main{
  	public static void main(String arts[]){
      	Scanner sc =  new Scanner(System.in);
      	int X = 0;
      	int Y = 0;
      	int Rls = 0;
      	int N = sc.nextInt();
      	sc.nextLine();
      	String Vlist = sc.nextLine();
      	String[] Vs = Vlist.split(" ");
      	int[] V = new int[Vs.length];
        for(int n = 0;n < V.length;n++){
          	V[n] = Integer.parseInt(Vs[n]); 
        }
      	String Clist = sc.nextLine();
      	String[] Cs = Clist.split(" ");
      	int[] C = new int[Cs.length];
      	for(int n = 0;n < C.length;n++){
          	C[n] = Integer.parseInt(Cs[n]);
        }
      	int[] D = new int[C.length];
      	for(int x = 0;x < D.length;x++){
          	D[x] = V[x] - C[x];
        }
      	Arrays.sort(D);
      	for(int n = C.length-1;n>=0;n--){
          if(D[n]<=0){
            	break;
          }
          Rls = Rls + D[n];
        }
      	System.out.println(Rls);
    }
}
              	