import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int total = 0;
    ArrayList<Integer> list1 = new ArrayList<Integer>();
    for (int i = 0; i < N; i++) {
      list1.add(sc.nextInt());
    }
    for (int i = 0; i < N; i++) {
      int A = sc.nextInt();
      if (list1.get(i) > A) {
        total += list1.get(i) - A;
      }
    }
    System.out.println(total);

  }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int total = 0;
    ArrayList<Integer> list1 = new ArrayList<Integer>();
    for (int i = 0; i < N; i++) {
      list1.add(sc.nextInt());
    }
    for (int i = 0; i < N; i++) {
      int A = sc.nextInt();
      if (list1.get(i) > A) {
        total += list1.get(i) - A;
      }
    }
    System.out.println(total);

  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int total = 0;
    ArrayList<Integer> list1 = new ArrayList<Integer>();
    for (int i = 0; i < N; i++) {
      list1.add(sc.nextInt());
    }
    for (int i = 0; i < N; i++) {
      int A = sc.nextInt();
      if (list1.get(i) > A) {
        total += list1.get(i) - A;
      }
    }
    System.out.println(total);

  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int total = 0;
    ArrayList<Integer> list1 = new ArrayList<Integer>();
    for (int i = 0; i < N; i++) {
      list1.add(sc.nextInt());
    }
    for (int i = 0; i < N; i++) {
      int A = sc.nextInt();
      if (list1.get(i) > A) {
        total += list1.get(i) - A;
      }
    }
    System.out.println(total);

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int total = 0; total 0 ArrayList<Integer> list1 = new ArrayList<Integer>(); list1 new ArrayList<Integer>() for (int i = 0; i < N; i++) {
      list1.add(sc.nextInt());
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      list1.add(sc.nextInt());
    } {
      list1.add(sc.nextInt());
    } list1.add(sc.nextInt()) list1.add list1 sc.nextInt() sc.nextInt sc for (int i = 0; i < N; i++) {
      int A = sc.nextInt();
      if (list1.get(i) > A) {
        total += list1.get(i) - A;
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      int A = sc.nextInt();
      if (list1.get(i) > A) {
        total += list1.get(i) - A;
      }
    } {
      int A = sc.nextInt();
      if (list1.get(i) > A) {
        total += list1.get(i) - A;
      }
    } int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc if (list1.get(i) > A) {
        total += list1.get(i) - A;
      } list1.get(i) > A list1.get(i) list1.get list1 i A {
        total += list1.get(i) - A;
      } total += list1.get(i) - A total list1.get(i) - A list1.get(i) list1.get list1 i A System.out.println(total) System.out.println System.out System System.out total String[] args args public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int total = 0;
    ArrayList<Integer> list1 = new ArrayList<Integer>();
    for (int i = 0; i < N; i++) {
      list1.add(sc.nextInt());
    }
    for (int i = 0; i < N; i++) {
      int A = sc.nextInt();
      if (list1.get(i) > A) {
        total += list1.get(i) - A;
      }
    }
    System.out.println(total);

  }
} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int total = 0;
    ArrayList<Integer> list1 = new ArrayList<Integer>();
    for (int i = 0; i < N; i++) {
      list1.add(sc.nextInt());
    }
    for (int i = 0; i < N; i++) {
      int A = sc.nextInt();
      if (list1.get(i) > A) {
        total += list1.get(i) - A;
      }
    }
    System.out.println(total);

  }
} Main
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int total = 0;
    ArrayList<Integer> list1 = new ArrayList<Integer>();
    for (int i = 0; i < N; i++) {
      list1.add(sc.nextInt());
    }
    for (int i = 0; i < N; i++) {
      int A = sc.nextInt();
      if (list1.get(i) > A) {
        total += list1.get(i) - A;
      }
    }
    System.out.println(total);

  }
}
