import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		int s[]=new int[a];
		int f[]=new int[a];
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			s[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			f[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			b[i]=s[i]-f[i];
		}
		Arrays.sort(b);
		int ans=0;
		for(int i=a-1;i>-1;i--) {
			if(b[i]<0) {
				break;
			}
			ans+=b[i];
		}
		System.out.println(ans);
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		int s[]=new int[a];
		int f[]=new int[a];
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			s[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			f[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			b[i]=s[i]-f[i];
		}
		Arrays.sort(b);
		int ans=0;
		for(int i=a-1;i>-1;i--) {
			if(b[i]<0) {
				break;
			}
			ans+=b[i];
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		int s[]=new int[a];
		int f[]=new int[a];
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			s[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			f[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			b[i]=s[i]-f[i];
		}
		Arrays.sort(b);
		int ans=0;
		for(int i=a-1;i>-1;i--) {
			if(b[i]<0) {
				break;
			}
			ans+=b[i];
		}
		System.out.println(ans);
	} main {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		int s[]=new int[a];
		int f[]=new int[a];
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			s[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			f[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			b[i]=s[i]-f[i];
		}
		Arrays.sort(b);
		int ans=0;
		for(int i=a-1;i>-1;i--) {
			if(b[i]<0) {
				break;
			}
			ans+=b[i];
		}
		System.out.println(ans);
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int a=scan.nextInt(); a scan.nextInt() scan.nextInt scan int s[]=new int[a]; s new int[a] a int f[]=new int[a]; f new int[a] a int b[]=new int[a]; b new int[a] a for(int i=0;i<a;i++) {
			s[i]=scan.nextInt();
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			s[i]=scan.nextInt();
		} {
			s[i]=scan.nextInt();
		} s[i]=scan.nextInt() s[i] s i scan.nextInt() scan.nextInt scan for(int i=0;i<a;i++) {
			f[i]=scan.nextInt();
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			f[i]=scan.nextInt();
		} {
			f[i]=scan.nextInt();
		} f[i]=scan.nextInt() f[i] f i scan.nextInt() scan.nextInt scan for(int i=0;i<a;i++) {
			b[i]=s[i]-f[i];
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			b[i]=s[i]-f[i];
		} {
			b[i]=s[i]-f[i];
		} b[i]=s[i]-f[i] b[i] b i s[i]-f[i] s[i] s i f[i] f i Arrays.sort(b) Arrays.sort Arrays b int ans=0; ans 0 for(int i=a-1;i>-1;i--) {
			if(b[i]<0) {
				break;
			}
			ans+=b[i];
		} int i=a-1; int i=a-1; i a-1 a 1 i>-1 i -1 1 i-- i-- i {
			if(b[i]<0) {
				break;
			}
			ans+=b[i];
		} {
			if(b[i]<0) {
				break;
			}
			ans+=b[i];
		} if(b[i]<0) {
				break;
			} b[i]<0 b[i] b i 0 {
				break;
			} break; ans+=b[i] ans b[i] b i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		int s[]=new int[a];
		int f[]=new int[a];
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			s[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			f[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			b[i]=s[i]-f[i];
		}
		Arrays.sort(b);
		int ans=0;
		for(int i=a-1;i>-1;i--) {
			if(b[i]<0) {
				break;
			}
			ans+=b[i];
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		int s[]=new int[a];
		int f[]=new int[a];
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			s[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			f[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			b[i]=s[i]-f[i];
		}
		Arrays.sort(b);
		int ans=0;
		for(int i=a-1;i>-1;i--) {
			if(b[i]<0) {
				break;
			}
			ans+=b[i];
		}
		System.out.println(ans);
	}
} Main
import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		int s[]=new int[a];
		int f[]=new int[a];
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			s[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			f[i]=scan.nextInt();
		}
		for(int i=0;i<a;i++) {
			b[i]=s[i]-f[i];
		}
		Arrays.sort(b);
		int ans=0;
		for(int i=a-1;i>-1;i--) {
			if(b[i]<0) {
				break;
			}
			ans+=b[i];
		}
		System.out.println(ans);
	}
}
