import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    
    String firstline = scanner.nextLine();
    String secondline = scanner.nextLine();
    String thirdline = scanner.nextLine();
    
    String fl[] = firstline.split("\\s");
    String sl[] = secondline.split("\\s");
    String tl[] = thirdline.split("\\s");
    
    int N = Integer.parseInt(fl[0]);
    int j;
    int c;
    int max = 0;
    for(int i = 0; i < N; i++){
      j = Integer.parseInt(sl[i]);
      c = Integer.parseInt(tl[i]);
      if(j > c){
        max += j - c;
      }
    }
    System.out.println(max);
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    
    String firstline = scanner.nextLine();
    String secondline = scanner.nextLine();
    String thirdline = scanner.nextLine();
    
    String fl[] = firstline.split("\\s");
    String sl[] = secondline.split("\\s");
    String tl[] = thirdline.split("\\s");
    
    int N = Integer.parseInt(fl[0]);
    int j;
    int c;
    int max = 0;
    for(int i = 0; i < N; i++){
      j = Integer.parseInt(sl[i]);
      c = Integer.parseInt(tl[i]);
      if(j > c){
        max += j - c;
      }
    }
    System.out.println(max);
  }
} Main public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    
    String firstline = scanner.nextLine();
    String secondline = scanner.nextLine();
    String thirdline = scanner.nextLine();
    
    String fl[] = firstline.split("\\s");
    String sl[] = secondline.split("\\s");
    String tl[] = thirdline.split("\\s");
    
    int N = Integer.parseInt(fl[0]);
    int j;
    int c;
    int max = 0;
    for(int i = 0; i < N; i++){
      j = Integer.parseInt(sl[i]);
      c = Integer.parseInt(tl[i]);
      if(j > c){
        max += j - c;
      }
    }
    System.out.println(max);
  } main {
    Scanner scanner = new Scanner(System.in);
    
    String firstline = scanner.nextLine();
    String secondline = scanner.nextLine();
    String thirdline = scanner.nextLine();
    
    String fl[] = firstline.split("\\s");
    String sl[] = secondline.split("\\s");
    String tl[] = thirdline.split("\\s");
    
    int N = Integer.parseInt(fl[0]);
    int j;
    int c;
    int max = 0;
    for(int i = 0; i < N; i++){
      j = Integer.parseInt(sl[i]);
      c = Integer.parseInt(tl[i]);
      if(j > c){
        max += j - c;
      }
    }
    System.out.println(max);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String firstline = scanner.nextLine(); firstline scanner.nextLine() scanner.nextLine scanner String secondline = scanner.nextLine(); secondline scanner.nextLine() scanner.nextLine scanner String thirdline = scanner.nextLine(); thirdline scanner.nextLine() scanner.nextLine scanner String fl[] = firstline.split("\\s"); fl firstline.split("\\s") firstline.split firstline "\\s" String sl[] = secondline.split("\\s"); sl secondline.split("\\s") secondline.split secondline "\\s" String tl[] = thirdline.split("\\s"); tl thirdline.split("\\s") thirdline.split thirdline "\\s" int N = Integer.parseInt(fl[0]); N Integer.parseInt(fl[0]) Integer.parseInt Integer fl[0] fl 0 int j; j int c; c int max = 0; max 0 for(int i = 0; i < N; i++){
      j = Integer.parseInt(sl[i]);
      c = Integer.parseInt(tl[i]);
      if(j > c){
        max += j - c;
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      j = Integer.parseInt(sl[i]);
      c = Integer.parseInt(tl[i]);
      if(j > c){
        max += j - c;
      }
    } {
      j = Integer.parseInt(sl[i]);
      c = Integer.parseInt(tl[i]);
      if(j > c){
        max += j - c;
      }
    } j = Integer.parseInt(sl[i]) j Integer.parseInt(sl[i]) Integer.parseInt Integer sl[i] sl i c = Integer.parseInt(tl[i]) c Integer.parseInt(tl[i]) Integer.parseInt Integer tl[i] tl i if(j > c){
        max += j - c;
      } j > c j c {
        max += j - c;
      } max += j - c max j - c j c System.out.println(max) System.out.println System.out System System.out max String[] args args
import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    
    String firstline = scanner.nextLine();
    String secondline = scanner.nextLine();
    String thirdline = scanner.nextLine();
    
    String fl[] = firstline.split("\\s");
    String sl[] = secondline.split("\\s");
    String tl[] = thirdline.split("\\s");
    
    int N = Integer.parseInt(fl[0]);
    int j;
    int c;
    int max = 0;
    for(int i = 0; i < N; i++){
      j = Integer.parseInt(sl[i]);
      c = Integer.parseInt(tl[i]);
      if(j > c){
        max += j - c;
      }
    }
    System.out.println(max);
  }
}