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

public class wires_aa_line implements Runnable {

	public static void main(String[] args) {
		new Thread(new wires_aa_line()).start();
	}

	BufferedReader br;

	StringTokenizer st;

	PrintWriter out;

	boolean eof = false;

	Random rand = new Random(this.hashCode());

	public void run() {
		Locale.setDefault(Locale.US);
		try {
			br = new BufferedReader(new FileReader(FNAME + ".in"));
			out = new PrintWriter(FNAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	String FNAME = "wires";

	private void solve() throws IOException {
		int n = nextInt();
		int[] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = nextInt();
		}
		int[] b = new int[n];
		for (int i = 0; i < b.length; i++) {
			b[i] = nextInt();
		}
		long ans = 0;
		for (int i = 0; i < b.length; i++) {
			ans = ans + b[i] - a[i];
		}
		out.println(ans);
	}

}
