import java.util.Arrays;
import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int[] V = new int[N];
    int[] C = new int[N];
    for (int i = 0; i < N; i++) {
      V[i] = scanner.nextInt();
    }
    for (int i = 0; i < N; i++) {
      C[i] = scanner.nextInt();
    }
    int[] D = new int[N];
    for (int i = 0; i < N; i++) {
      D[i] = V[i] - C[i];
    }
    Arrays.sort(D);
    int ans = 0;
    for (int i = D.length - 1; i >= 0 && D[i] > 0; i--) {
      ans += D[i];
    }
    System.out.println(ans);
  }

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int[] V = new int[N];
    int[] C = new int[N];
    for (int i = 0; i < N; i++) {
      V[i] = scanner.nextInt();
    }
    for (int i = 0; i < N; i++) {
      C[i] = scanner.nextInt();
    }
    int[] D = new int[N];
    for (int i = 0; i < N; i++) {
      D[i] = V[i] - C[i];
    }
    Arrays.sort(D);
    int ans = 0;
    for (int i = D.length - 1; i >= 0 && D[i] > 0; i--) {
      ans += D[i];
    }
    System.out.println(ans);
  }

} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int[] V = new int[N];
    int[] C = new int[N];
    for (int i = 0; i < N; i++) {
      V[i] = scanner.nextInt();
    }
    for (int i = 0; i < N; i++) {
      C[i] = scanner.nextInt();
    }
    int[] D = new int[N];
    for (int i = 0; i < N; i++) {
      D[i] = V[i] - C[i];
    }
    Arrays.sort(D);
    int ans = 0;
    for (int i = D.length - 1; i >= 0 && D[i] > 0; i--) {
      ans += D[i];
    }
    System.out.println(ans);
  } main {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int[] V = new int[N];
    int[] C = new int[N];
    for (int i = 0; i < N; i++) {
      V[i] = scanner.nextInt();
    }
    for (int i = 0; i < N; i++) {
      C[i] = scanner.nextInt();
    }
    int[] D = new int[N];
    for (int i = 0; i < N; i++) {
      D[i] = V[i] - C[i];
    }
    Arrays.sort(D);
    int ans = 0;
    for (int i = D.length - 1; i >= 0 && D[i] > 0; i--) {
      ans += D[i];
    }
    System.out.println(ans);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int[] V = new int[N]; V new int[N] N int[] C = new int[N]; C new int[N] N for (int i = 0; i < N; i++) {
      V[i] = scanner.nextInt();
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      V[i] = scanner.nextInt();
    } {
      V[i] = scanner.nextInt();
    } V[i] = scanner.nextInt() V[i] V i scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < N; i++) {
      C[i] = scanner.nextInt();
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      C[i] = scanner.nextInt();
    } {
      C[i] = scanner.nextInt();
    } C[i] = scanner.nextInt() C[i] C i scanner.nextInt() scanner.nextInt scanner int[] D = new int[N]; D new int[N] N for (int i = 0; i < N; i++) {
      D[i] = V[i] - C[i];
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      D[i] = V[i] - C[i];
    } {
      D[i] = V[i] - C[i];
    } D[i] = V[i] - C[i] D[i] D i V[i] - C[i] V[i] V i C[i] C i Arrays.sort(D) Arrays.sort Arrays D int ans = 0; ans 0 for (int i = D.length - 1; i >= 0 && D[i] > 0; i--) {
      ans += D[i];
    } int i = D.length - 1; int i = D.length - 1; i D.length - 1 D.length D D.length 1 i >= 0 && D[i] > 0 i >= 0 i 0 D[i] > 0 D[i] D i 0 i-- i-- i {
      ans += D[i];
    } {
      ans += D[i];
    } ans += D[i] ans D[i] D i System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Arrays;
import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int[] V = new int[N];
    int[] C = new int[N];
    for (int i = 0; i < N; i++) {
      V[i] = scanner.nextInt();
    }
    for (int i = 0; i < N; i++) {
      C[i] = scanner.nextInt();
    }
    int[] D = new int[N];
    for (int i = 0; i < N; i++) {
      D[i] = V[i] - C[i];
    }
    Arrays.sort(D);
    int ans = 0;
    for (int i = D.length - 1; i >= 0 && D[i] > 0; i--) {
      ans += D[i];
    }
    System.out.println(ans);
  }

}
