import java.util.*;
import java.io.*;

class Main
{
  	public static void main(String[] args)
    {
		Scanner s = new Scanner(System.in);
      	int n = s.nextInt();
      	int[] a = new int[n];
      	int[] b = new int[n];
      	for(int i = 0 ; i<n ; i++)a[i] = s.nextInt();
      	for(int i = 0 ; i<n ; i++)b[i] = s.nextInt();
      	int sum = 0;
      	for(int i = 0 ;  i<n ;i++)
        {
          	if(a[i]>b[i])sum+=(a[i]-b[i]);
        }
      	System.out.println(sum);
    }
} import java.util.*; util.* java import java.io.*; io.* java class Main
{
  	public static void main(String[] args)
    {
		Scanner s = new Scanner(System.in);
      	int n = s.nextInt();
      	int[] a = new int[n];
      	int[] b = new int[n];
      	for(int i = 0 ; i<n ; i++)a[i] = s.nextInt();
      	for(int i = 0 ; i<n ; i++)b[i] = s.nextInt();
      	int sum = 0;
      	for(int i = 0 ;  i<n ;i++)
        {
          	if(a[i]>b[i])sum+=(a[i]-b[i]);
        }
      	System.out.println(sum);
    }
} Main public static void main(String[] args)
    {
		Scanner s = new Scanner(System.in);
      	int n = s.nextInt();
      	int[] a = new int[n];
      	int[] b = new int[n];
      	for(int i = 0 ; i<n ; i++)a[i] = s.nextInt();
      	for(int i = 0 ; i<n ; i++)b[i] = s.nextInt();
      	int sum = 0;
      	for(int i = 0 ;  i<n ;i++)
        {
          	if(a[i]>b[i])sum+=(a[i]-b[i]);
        }
      	System.out.println(sum);
    } main {
		Scanner s = new Scanner(System.in);
      	int n = s.nextInt();
      	int[] a = new int[n];
      	int[] b = new int[n];
      	for(int i = 0 ; i<n ; i++)a[i] = s.nextInt();
      	for(int i = 0 ; i<n ; i++)b[i] = s.nextInt();
      	int sum = 0;
      	for(int i = 0 ;  i<n ;i++)
        {
          	if(a[i]>b[i])sum+=(a[i]-b[i]);
        }
      	System.out.println(sum);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int[] a = new int[n]; a new int[n] n int[] b = new int[n]; b new int[n] n for(int i = 0 ; i<n ; i++)a[i] = s.nextInt(); int i = 0 ; int i = 0 ; i 0 i<n i n i++ i++ i a[i] = s.nextInt(); a[i] = s.nextInt() a[i] a i s.nextInt() s.nextInt s for(int i = 0 ; i<n ; i++)b[i] = s.nextInt(); int i = 0 ; int i = 0 ; i 0 i<n i n i++ i++ i b[i] = s.nextInt(); b[i] = s.nextInt() b[i] b i s.nextInt() s.nextInt s int sum = 0; sum 0 for(int i = 0 ;  i<n ;i++)
        {
          	if(a[i]>b[i])sum+=(a[i]-b[i]);
        } int i = 0 ; int i = 0 ; i 0 i<n i n i++ i++ i {
          	if(a[i]>b[i])sum+=(a[i]-b[i]);
        } {
          	if(a[i]>b[i])sum+=(a[i]-b[i]);
        } if(a[i]>b[i])sum+=(a[i]-b[i]); a[i]>b[i] a[i] a i b[i] b i sum+=(a[i]-b[i]) sum (a[i]-b[i]) a[i] a i b[i] b i System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.util.*;
import java.io.*;

class Main
{
  	public static void main(String[] args)
    {
		Scanner s = new Scanner(System.in);
      	int n = s.nextInt();
      	int[] a = new int[n];
      	int[] b = new int[n];
      	for(int i = 0 ; i<n ; i++)a[i] = s.nextInt();
      	for(int i = 0 ; i<n ; i++)b[i] = s.nextInt();
      	int sum = 0;
      	for(int i = 0 ;  i<n ;i++)
        {
          	if(a[i]>b[i])sum+=(a[i]-b[i]);
        }
      	System.out.println(sum);
    }
}