

import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();//データの数 
		int V[] = new int[N]; //配列数を決定
		int C[] = new int[N]; //配列数を決定
		int ans[] = new int[N]; //配列数を決定
		
		for(int i = 0; i<N; i++) {
			V[i] = sc.nextInt(); //配列の中身を挿入
			
		}
		
		for(int i = 0; i<N; i++) {
            C[i] = sc.nextInt(); //配列の中身を挿入
		}
	
		for(int i = 0; i<N; i++) {
            ans[i]=V[i]-C[i]; 
		}
		
		// int配列をInteger配列にコピー(キャスト)
		Integer[] ans1 = new Integer[ ans.length ];
		for ( int i = 0; i < ans.length; ++ i ) {
		    ans1[i] = ans[i];
		 		}
		 	// 降順ソート
		Arrays.sort( ans1, Collections.reverseOrder() );
		
		// Integer配列をint配列にコピー(再キャスト)
		for ( int i = 0; i < ans1.length; ++ i ) {
		 	ans[i] = ans1[i];
		}
		 // 配列の中身を表示
		//for ( int i = 0; i < ans.length; ++ i ) {
		// 	System.out.println(ans[i]);
		//}
		int nums = 0;
		for ( int i = 0; i < ans.length; ++ i ) {
		  if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  }
		}
		System.out.println(nums);
	}
	
} import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();//データの数 
		int V[] = new int[N]; //配列数を決定
		int C[] = new int[N]; //配列数を決定
		int ans[] = new int[N]; //配列数を決定
		
		for(int i = 0; i<N; i++) {
			V[i] = sc.nextInt(); //配列の中身を挿入
			
		}
		
		for(int i = 0; i<N; i++) {
            C[i] = sc.nextInt(); //配列の中身を挿入
		}
	
		for(int i = 0; i<N; i++) {
            ans[i]=V[i]-C[i]; 
		}
		
		// int配列をInteger配列にコピー(キャスト)
		Integer[] ans1 = new Integer[ ans.length ];
		for ( int i = 0; i < ans.length; ++ i ) {
		    ans1[i] = ans[i];
		 		}
		 	// 降順ソート
		Arrays.sort( ans1, Collections.reverseOrder() );
		
		// Integer配列をint配列にコピー(再キャスト)
		for ( int i = 0; i < ans1.length; ++ i ) {
		 	ans[i] = ans1[i];
		}
		 // 配列の中身を表示
		//for ( int i = 0; i < ans.length; ++ i ) {
		// 	System.out.println(ans[i]);
		//}
		int nums = 0;
		for ( int i = 0; i < ans.length; ++ i ) {
		  if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  }
		}
		System.out.println(nums);
	}
	
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();//データの数 
		int V[] = new int[N]; //配列数を決定
		int C[] = new int[N]; //配列数を決定
		int ans[] = new int[N]; //配列数を決定
		
		for(int i = 0; i<N; i++) {
			V[i] = sc.nextInt(); //配列の中身を挿入
			
		}
		
		for(int i = 0; i<N; i++) {
            C[i] = sc.nextInt(); //配列の中身を挿入
		}
	
		for(int i = 0; i<N; i++) {
            ans[i]=V[i]-C[i]; 
		}
		
		// int配列をInteger配列にコピー(キャスト)
		Integer[] ans1 = new Integer[ ans.length ];
		for ( int i = 0; i < ans.length; ++ i ) {
		    ans1[i] = ans[i];
		 		}
		 	// 降順ソート
		Arrays.sort( ans1, Collections.reverseOrder() );
		
		// Integer配列をint配列にコピー(再キャスト)
		for ( int i = 0; i < ans1.length; ++ i ) {
		 	ans[i] = ans1[i];
		}
		 // 配列の中身を表示
		//for ( int i = 0; i < ans.length; ++ i ) {
		// 	System.out.println(ans[i]);
		//}
		int nums = 0;
		for ( int i = 0; i < ans.length; ++ i ) {
		  if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  }
		}
		System.out.println(nums);
	} main {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();//データの数 
		int V[] = new int[N]; //配列数を決定
		int C[] = new int[N]; //配列数を決定
		int ans[] = new int[N]; //配列数を決定
		
		for(int i = 0; i<N; i++) {
			V[i] = sc.nextInt(); //配列の中身を挿入
			
		}
		
		for(int i = 0; i<N; i++) {
            C[i] = sc.nextInt(); //配列の中身を挿入
		}
	
		for(int i = 0; i<N; i++) {
            ans[i]=V[i]-C[i]; 
		}
		
		// int配列をInteger配列にコピー(キャスト)
		Integer[] ans1 = new Integer[ ans.length ];
		for ( int i = 0; i < ans.length; ++ i ) {
		    ans1[i] = ans[i];
		 		}
		 	// 降順ソート
		Arrays.sort( ans1, Collections.reverseOrder() );
		
		// Integer配列をint配列にコピー(再キャスト)
		for ( int i = 0; i < ans1.length; ++ i ) {
		 	ans[i] = ans1[i];
		}
		 // 配列の中身を表示
		//for ( int i = 0; i < ans.length; ++ i ) {
		// 	System.out.println(ans[i]);
		//}
		int nums = 0;
		for ( int i = 0; i < ans.length; ++ i ) {
		  if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  }
		}
		System.out.println(nums);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int V[] = new int[N]; V new int[N] N int C[] = new int[N]; C new int[N] N int ans[] = new int[N]; ans new int[N] N for(int i = 0; i<N; i++) {
			V[i] = sc.nextInt(); //配列の中身を挿入
			
		} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
			V[i] = sc.nextInt(); //配列の中身を挿入
			
		} {
			V[i] = sc.nextInt(); //配列の中身を挿入
			
		} V[i] = sc.nextInt() V[i] V i sc.nextInt() sc.nextInt sc for(int i = 0; i<N; i++) {
            C[i] = sc.nextInt(); //配列の中身を挿入
		} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
            C[i] = sc.nextInt(); //配列の中身を挿入
		} {
            C[i] = sc.nextInt(); //配列の中身を挿入
		} C[i] = sc.nextInt() C[i] C i sc.nextInt() sc.nextInt sc for(int i = 0; i<N; i++) {
            ans[i]=V[i]-C[i]; 
		} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
            ans[i]=V[i]-C[i]; 
		} {
            ans[i]=V[i]-C[i]; 
		} ans[i]=V[i]-C[i] ans[i] ans i V[i]-C[i] V[i] V i C[i] C i Integer[] ans1 = new Integer[ ans.length ]; ans1 new Integer[ ans.length ] ans.length ans ans.length for ( int i = 0; i < ans.length; ++ i ) {
		    ans1[i] = ans[i];
		 		} int i = 0; int i = 0; i 0 i < ans.length i ans.length ans ans.length ++ i ++ i i {
		    ans1[i] = ans[i];
		 		} {
		    ans1[i] = ans[i];
		 		} ans1[i] = ans[i] ans1[i] ans1 i ans[i] ans i Arrays.sort( ans1, Collections.reverseOrder() ) Arrays.sort Arrays ans1 Collections.reverseOrder() Collections.reverseOrder Collections for ( int i = 0; i < ans1.length; ++ i ) {
		 	ans[i] = ans1[i];
		} int i = 0; int i = 0; i 0 i < ans1.length i ans1.length ans1 ans1.length ++ i ++ i i {
		 	ans[i] = ans1[i];
		} {
		 	ans[i] = ans1[i];
		} ans[i] = ans1[i] ans[i] ans i ans1[i] ans1 i int nums = 0; nums 0 for ( int i = 0; i < ans.length; ++ i ) {
		  if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  }
		} int i = 0; int i = 0; i 0 i < ans.length i ans.length ans ans.length ++ i ++ i i {
		  if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  }
		} {
		  if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  }
		} if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  } ans[i]>0 ans[i] ans i 0 {
		      nums +=ans[i];
		  } nums +=ans[i] nums ans[i] ans i {
			  nums += 0;
		  } nums += 0 nums 0 System.out.println(nums) System.out.println System.out System System.out nums String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();//データの数 
		int V[] = new int[N]; //配列数を決定
		int C[] = new int[N]; //配列数を決定
		int ans[] = new int[N]; //配列数を決定
		
		for(int i = 0; i<N; i++) {
			V[i] = sc.nextInt(); //配列の中身を挿入
			
		}
		
		for(int i = 0; i<N; i++) {
            C[i] = sc.nextInt(); //配列の中身を挿入
		}
	
		for(int i = 0; i<N; i++) {
            ans[i]=V[i]-C[i]; 
		}
		
		// int配列をInteger配列にコピー(キャスト)
		Integer[] ans1 = new Integer[ ans.length ];
		for ( int i = 0; i < ans.length; ++ i ) {
		    ans1[i] = ans[i];
		 		}
		 	// 降順ソート
		Arrays.sort( ans1, Collections.reverseOrder() );
		
		// Integer配列をint配列にコピー(再キャスト)
		for ( int i = 0; i < ans1.length; ++ i ) {
		 	ans[i] = ans1[i];
		}
		 // 配列の中身を表示
		//for ( int i = 0; i < ans.length; ++ i ) {
		// 	System.out.println(ans[i]);
		//}
		int nums = 0;
		for ( int i = 0; i < ans.length; ++ i ) {
		  if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  }
		}
		System.out.println(nums);
	}
	
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();//データの数 
		int V[] = new int[N]; //配列数を決定
		int C[] = new int[N]; //配列数を決定
		int ans[] = new int[N]; //配列数を決定
		
		for(int i = 0; i<N; i++) {
			V[i] = sc.nextInt(); //配列の中身を挿入
			
		}
		
		for(int i = 0; i<N; i++) {
            C[i] = sc.nextInt(); //配列の中身を挿入
		}
	
		for(int i = 0; i<N; i++) {
            ans[i]=V[i]-C[i]; 
		}
		
		// int配列をInteger配列にコピー(キャスト)
		Integer[] ans1 = new Integer[ ans.length ];
		for ( int i = 0; i < ans.length; ++ i ) {
		    ans1[i] = ans[i];
		 		}
		 	// 降順ソート
		Arrays.sort( ans1, Collections.reverseOrder() );
		
		// Integer配列をint配列にコピー(再キャスト)
		for ( int i = 0; i < ans1.length; ++ i ) {
		 	ans[i] = ans1[i];
		}
		 // 配列の中身を表示
		//for ( int i = 0; i < ans.length; ++ i ) {
		// 	System.out.println(ans[i]);
		//}
		int nums = 0;
		for ( int i = 0; i < ans.length; ++ i ) {
		  if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  }
		}
		System.out.println(nums);
	}
	
} Main


import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();//データの数 
		int V[] = new int[N]; //配列数を決定
		int C[] = new int[N]; //配列数を決定
		int ans[] = new int[N]; //配列数を決定
		
		for(int i = 0; i<N; i++) {
			V[i] = sc.nextInt(); //配列の中身を挿入
			
		}
		
		for(int i = 0; i<N; i++) {
            C[i] = sc.nextInt(); //配列の中身を挿入
		}
	
		for(int i = 0; i<N; i++) {
            ans[i]=V[i]-C[i]; 
		}
		
		// int配列をInteger配列にコピー(キャスト)
		Integer[] ans1 = new Integer[ ans.length ];
		for ( int i = 0; i < ans.length; ++ i ) {
		    ans1[i] = ans[i];
		 		}
		 	// 降順ソート
		Arrays.sort( ans1, Collections.reverseOrder() );
		
		// Integer配列をint配列にコピー(再キャスト)
		for ( int i = 0; i < ans1.length; ++ i ) {
		 	ans[i] = ans1[i];
		}
		 // 配列の中身を表示
		//for ( int i = 0; i < ans.length; ++ i ) {
		// 	System.out.println(ans[i]);
		//}
		int nums = 0;
		for ( int i = 0; i < ans.length; ++ i ) {
		  if(ans[i]>0) {
		      nums +=ans[i];
		  }else {
			  nums += 0;
		  }
		}
		System.out.println(nums);
	}
	
}
