import java.util.Scanner;
import java.util.ArrayList;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int repeatNum = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>(repeatNum);
    for(int i= 0;i<repeatNum;i++){
      list.add(sc.nextInt());
    }
    int result = 0;
    int temp=0;
    for(int j= 0;j<repeatNum;j++){
      temp= list.get(j) - sc.nextInt();
      if(temp>0){
        result+=temp;
      }
    }
    System.out.println(result);
  }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int repeatNum = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>(repeatNum);
    for(int i= 0;i<repeatNum;i++){
      list.add(sc.nextInt());
    }
    int result = 0;
    int temp=0;
    for(int j= 0;j<repeatNum;j++){
      temp= list.get(j) - sc.nextInt();
      if(temp>0){
        result+=temp;
      }
    }
    System.out.println(result);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int repeatNum = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>(repeatNum);
    for(int i= 0;i<repeatNum;i++){
      list.add(sc.nextInt());
    }
    int result = 0;
    int temp=0;
    for(int j= 0;j<repeatNum;j++){
      temp= list.get(j) - sc.nextInt();
      if(temp>0){
        result+=temp;
      }
    }
    System.out.println(result);
  } main {
    Scanner sc = new Scanner(System.in);
    int repeatNum = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>(repeatNum);
    for(int i= 0;i<repeatNum;i++){
      list.add(sc.nextInt());
    }
    int result = 0;
    int temp=0;
    for(int j= 0;j<repeatNum;j++){
      temp= list.get(j) - sc.nextInt();
      if(temp>0){
        result+=temp;
      }
    }
    System.out.println(result);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int repeatNum = sc.nextInt(); repeatNum sc.nextInt() sc.nextInt sc ArrayList<Integer> list = new ArrayList<Integer>(repeatNum); list new ArrayList<Integer>(repeatNum) for(int i= 0;i<repeatNum;i++){
      list.add(sc.nextInt());
    } int i= 0; int i= 0; i 0 i<repeatNum i repeatNum i++ i++ i {
      list.add(sc.nextInt());
    } {
      list.add(sc.nextInt());
    } list.add(sc.nextInt()) list.add list sc.nextInt() sc.nextInt sc int result = 0; result 0 int temp=0; temp 0 for(int j= 0;j<repeatNum;j++){
      temp= list.get(j) - sc.nextInt();
      if(temp>0){
        result+=temp;
      }
    } int j= 0; int j= 0; j 0 j<repeatNum j repeatNum j++ j++ j {
      temp= list.get(j) - sc.nextInt();
      if(temp>0){
        result+=temp;
      }
    } {
      temp= list.get(j) - sc.nextInt();
      if(temp>0){
        result+=temp;
      }
    } temp= list.get(j) - sc.nextInt() temp list.get(j) - sc.nextInt() list.get(j) list.get list j sc.nextInt() sc.nextInt sc if(temp>0){
        result+=temp;
      } temp>0 temp 0 {
        result+=temp;
      } result+=temp result temp System.out.println(result) System.out.println System.out System System.out result String[] args args
import java.util.Scanner;
import java.util.ArrayList;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int repeatNum = sc.nextInt();
    ArrayList<Integer> list = new ArrayList<Integer>(repeatNum);
    for(int i= 0;i<repeatNum;i++){
      list.add(sc.nextInt());
    }
    int result = 0;
    int temp=0;
    for(int j= 0;j<repeatNum;j++){
      temp= list.get(j) - sc.nextInt();
      if(temp>0){
        result+=temp;
      }
    }
    System.out.println(result);
  }
}