

import java.util.Scanner;

public class Main {

	public static void main(String args[])
	{
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int v[]=new int[n];
		int c[]=new int[n];
		for(int i=0;i<n;i++)
		{
			v[i]=scan.nextInt();
			

		}
		for(int i=0;i<n;i++)
		{
			c[i]=scan.nextInt();
		}
		long sum=0;
		for(int i=0;i<n;i++)
		{
			if(v[i]>c[i])
			{
				sum+=(v[i]-c[i]);
			}
		}
		System.out.println(sum);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String args[])
	{
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int v[]=new int[n];
		int c[]=new int[n];
		for(int i=0;i<n;i++)
		{
			v[i]=scan.nextInt();
			

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

		}
		for(int i=0;i<n;i++)
		{
			c[i]=scan.nextInt();
		}
		long sum=0;
		for(int i=0;i<n;i++)
		{
			if(v[i]>c[i])
			{
				sum+=(v[i]-c[i]);
			}
		}
		System.out.println(sum);
	} main {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int v[]=new int[n];
		int c[]=new int[n];
		for(int i=0;i<n;i++)
		{
			v[i]=scan.nextInt();
			

		}
		for(int i=0;i<n;i++)
		{
			c[i]=scan.nextInt();
		}
		long sum=0;
		for(int i=0;i<n;i++)
		{
			if(v[i]>c[i])
			{
				sum+=(v[i]-c[i]);
			}
		}
		System.out.println(sum);
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int n=scan.nextInt(); n scan.nextInt() scan.nextInt scan 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]=scan.nextInt();
			

		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			v[i]=scan.nextInt();
			

		} {
			v[i]=scan.nextInt();
			

		} v[i]=scan.nextInt() v[i] v i scan.nextInt() scan.nextInt scan for(int i=0;i<n;i++)
		{
			c[i]=scan.nextInt();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			c[i]=scan.nextInt();
		} {
			c[i]=scan.nextInt();
		} c[i]=scan.nextInt() c[i] c i scan.nextInt() scan.nextInt scan long sum=0; sum 0 for(int i=0;i<n;i++)
		{
			if(v[i]>c[i])
			{
				sum+=(v[i]-c[i]);
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(v[i]>c[i])
			{
				sum+=(v[i]-c[i]);
			}
		} {
			if(v[i]>c[i])
			{
				sum+=(v[i]-c[i]);
			}
		} if(v[i]>c[i])
			{
				sum+=(v[i]-c[i]);
			} v[i]>c[i] v[i] v i c[i] c i {
				sum+=(v[i]-c[i]);
			} sum+=(v[i]-c[i]) sum (v[i]-c[i]) v[i] v i c[i] c i System.out.println(sum) System.out.println System.out System System.out sum String args[] args public class Main {

	public static void main(String args[])
	{
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int v[]=new int[n];
		int c[]=new int[n];
		for(int i=0;i<n;i++)
		{
			v[i]=scan.nextInt();
			

		}
		for(int i=0;i<n;i++)
		{
			c[i]=scan.nextInt();
		}
		long sum=0;
		for(int i=0;i<n;i++)
		{
			if(v[i]>c[i])
			{
				sum+=(v[i]-c[i]);
			}
		}
		System.out.println(sum);
	}
} public class Main {

	public static void main(String args[])
	{
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int v[]=new int[n];
		int c[]=new int[n];
		for(int i=0;i<n;i++)
		{
			v[i]=scan.nextInt();
			

		}
		for(int i=0;i<n;i++)
		{
			c[i]=scan.nextInt();
		}
		long sum=0;
		for(int i=0;i<n;i++)
		{
			if(v[i]>c[i])
			{
				sum+=(v[i]-c[i]);
			}
		}
		System.out.println(sum);
	}
} Main


import java.util.Scanner;

public class Main {

	public static void main(String args[])
	{
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int v[]=new int[n];
		int c[]=new int[n];
		for(int i=0;i<n;i++)
		{
			v[i]=scan.nextInt();
			

		}
		for(int i=0;i<n;i++)
		{
			c[i]=scan.nextInt();
		}
		long sum=0;
		for(int i=0;i<n;i++)
		{
			if(v[i]>c[i])
			{
				sum+=(v[i]-c[i]);
			}
		}
		System.out.println(sum);
	}
}
