import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	String[] spi = new String[n];
      	int list = 0;
      	int[] v = new int[n];
      	int[] cost = new int[n];
      	for(int i = 0; i < n ; i ++){
        	v[i] = sc.nextInt();
        }
      	for(int i = 0; i < n ; i ++){
        	cost[i] = sc.nextInt();
        }
      	for(int i = 0; i < n; i ++){
          	spi[i] = v[i] + "_" + cost[i];
          	list += v[i] - cost[i];
        }
      	Arrays.sort(spi);
      	for(String s : spi){
          	int value = Integer.parseInt(s.split("_")[0]);
          	int c = Integer.parseInt(s.split("_")[1]);
        	list = Math.max(list, list - value + c);
        }
      	System.out.print(list);
      	
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	String[] spi = new String[n];
      	int list = 0;
      	int[] v = new int[n];
      	int[] cost = new int[n];
      	for(int i = 0; i < n ; i ++){
        	v[i] = sc.nextInt();
        }
      	for(int i = 0; i < n ; i ++){
        	cost[i] = sc.nextInt();
        }
      	for(int i = 0; i < n; i ++){
          	spi[i] = v[i] + "_" + cost[i];
          	list += v[i] - cost[i];
        }
      	Arrays.sort(spi);
      	for(String s : spi){
          	int value = Integer.parseInt(s.split("_")[0]);
          	int c = Integer.parseInt(s.split("_")[1]);
        	list = Math.max(list, list - value + c);
        }
      	System.out.print(list);
      	
    }
} Main public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	String[] spi = new String[n];
      	int list = 0;
      	int[] v = new int[n];
      	int[] cost = new int[n];
      	for(int i = 0; i < n ; i ++){
        	v[i] = sc.nextInt();
        }
      	for(int i = 0; i < n ; i ++){
        	cost[i] = sc.nextInt();
        }
      	for(int i = 0; i < n; i ++){
          	spi[i] = v[i] + "_" + cost[i];
          	list += v[i] - cost[i];
        }
      	Arrays.sort(spi);
      	for(String s : spi){
          	int value = Integer.parseInt(s.split("_")[0]);
          	int c = Integer.parseInt(s.split("_")[1]);
        	list = Math.max(list, list - value + c);
        }
      	System.out.print(list);
      	
    } main {
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	String[] spi = new String[n];
      	int list = 0;
      	int[] v = new int[n];
      	int[] cost = new int[n];
      	for(int i = 0; i < n ; i ++){
        	v[i] = sc.nextInt();
        }
      	for(int i = 0; i < n ; i ++){
        	cost[i] = sc.nextInt();
        }
      	for(int i = 0; i < n; i ++){
          	spi[i] = v[i] + "_" + cost[i];
          	list += v[i] - cost[i];
        }
      	Arrays.sort(spi);
      	for(String s : spi){
          	int value = Integer.parseInt(s.split("_")[0]);
          	int c = Integer.parseInt(s.split("_")[1]);
        	list = Math.max(list, list - value + c);
        }
      	System.out.print(list);
      	
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] spi = new String[n]; spi new String[n] n int list = 0; list 0 int[] v = new int[n]; v new int[n] n int[] cost = new int[n]; cost 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 ++){
        	cost[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i ++ i ++ i {
        	cost[i] = sc.nextInt();
        } {
        	cost[i] = sc.nextInt();
        } cost[i] = sc.nextInt() cost[i] cost i sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i ++){
          	spi[i] = v[i] + "_" + cost[i];
          	list += v[i] - cost[i];
        } int i = 0; int i = 0; i 0 i < n i n i ++ i ++ i {
          	spi[i] = v[i] + "_" + cost[i];
          	list += v[i] - cost[i];
        } {
          	spi[i] = v[i] + "_" + cost[i];
          	list += v[i] - cost[i];
        } spi[i] = v[i] + "_" + cost[i] spi[i] spi i v[i] + "_" + cost[i] v[i] + "_" + cost[i] v[i] v i "_" cost[i] cost i list += v[i] - cost[i] list v[i] - cost[i] v[i] v i cost[i] cost i Arrays.sort(spi) Arrays.sort Arrays spi for(String s : spi){
          	int value = Integer.parseInt(s.split("_")[0]);
          	int c = Integer.parseInt(s.split("_")[1]);
        	list = Math.max(list, list - value + c);
        } String s spi {
          	int value = Integer.parseInt(s.split("_")[0]);
          	int c = Integer.parseInt(s.split("_")[1]);
        	list = Math.max(list, list - value + c);
        } {
          	int value = Integer.parseInt(s.split("_")[0]);
          	int c = Integer.parseInt(s.split("_")[1]);
        	list = Math.max(list, list - value + c);
        } int value = Integer.parseInt(s.split("_")[0]); value Integer.parseInt(s.split("_")[0]) Integer.parseInt Integer s.split("_")[0] s.split("_") s.split s "_" 0 int c = Integer.parseInt(s.split("_")[1]); c Integer.parseInt(s.split("_")[1]) Integer.parseInt Integer s.split("_")[1] s.split("_") s.split s "_" 1 list = Math.max(list, list - value + c) list Math.max(list, list - value + c) Math.max Math list list - value + c list - value list value c System.out.print(list) System.out.print System.out System System.out list String[] args args public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	String[] spi = new String[n];
      	int list = 0;
      	int[] v = new int[n];
      	int[] cost = new int[n];
      	for(int i = 0; i < n ; i ++){
        	v[i] = sc.nextInt();
        }
      	for(int i = 0; i < n ; i ++){
        	cost[i] = sc.nextInt();
        }
      	for(int i = 0; i < n; i ++){
          	spi[i] = v[i] + "_" + cost[i];
          	list += v[i] - cost[i];
        }
      	Arrays.sort(spi);
      	for(String s : spi){
          	int value = Integer.parseInt(s.split("_")[0]);
          	int c = Integer.parseInt(s.split("_")[1]);
        	list = Math.max(list, list - value + c);
        }
      	System.out.print(list);
      	
    }
} public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	String[] spi = new String[n];
      	int list = 0;
      	int[] v = new int[n];
      	int[] cost = new int[n];
      	for(int i = 0; i < n ; i ++){
        	v[i] = sc.nextInt();
        }
      	for(int i = 0; i < n ; i ++){
        	cost[i] = sc.nextInt();
        }
      	for(int i = 0; i < n; i ++){
          	spi[i] = v[i] + "_" + cost[i];
          	list += v[i] - cost[i];
        }
      	Arrays.sort(spi);
      	for(String s : spi){
          	int value = Integer.parseInt(s.split("_")[0]);
          	int c = Integer.parseInt(s.split("_")[1]);
        	list = Math.max(list, list - value + c);
        }
      	System.out.print(list);
      	
    }
} Main
import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	String[] spi = new String[n];
      	int list = 0;
      	int[] v = new int[n];
      	int[] cost = new int[n];
      	for(int i = 0; i < n ; i ++){
        	v[i] = sc.nextInt();
        }
      	for(int i = 0; i < n ; i ++){
        	cost[i] = sc.nextInt();
        }
      	for(int i = 0; i < n; i ++){
          	spi[i] = v[i] + "_" + cost[i];
          	list += v[i] - cost[i];
        }
      	Arrays.sort(spi);
      	for(String s : spi){
          	int value = Integer.parseInt(s.split("_")[0]);
          	int c = Integer.parseInt(s.split("_")[1]);
        	list = Math.max(list, list - value + c);
        }
      	System.out.print(list);
      	
    }
}