import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args)
    {
        Reader r=new Reader();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int N=r.nextInt();
        int[] values=new int[N];
        int[] costs=new int[N];
        int[] diff=new int[N];
        for(int i=0; i<N; i++)
        {
            values[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            costs[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            diff[i]=values[i]-costs[i];
        }
        Arrays.sort(diff);
        solve(out, diff);
        out.close();


    }
    static void solve(PrintWriter out, int[] diff)
    {
        int max=0;
        for(int i=0; i<diff.length; i++) {
            if (diff[i] > 0) {
                max += diff[i];
            }
        }
        out.println(max);
    }

    //Fast I/O class
    static class Reader
    {
        BufferedReader br;
        StringTokenizer st;

        public Reader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }


} import java.io.*; io.* java import java.util.Arrays; Arrays java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] args)
    {
        Reader r=new Reader();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int N=r.nextInt();
        int[] values=new int[N];
        int[] costs=new int[N];
        int[] diff=new int[N];
        for(int i=0; i<N; i++)
        {
            values[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            costs[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            diff[i]=values[i]-costs[i];
        }
        Arrays.sort(diff);
        solve(out, diff);
        out.close();


    }
    static void solve(PrintWriter out, int[] diff)
    {
        int max=0;
        for(int i=0; i<diff.length; i++) {
            if (diff[i] > 0) {
                max += diff[i];
            }
        }
        out.println(max);
    }

    //Fast I/O class
    static class Reader
    {
        BufferedReader br;
        StringTokenizer st;

        public Reader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }


} Main public static void main(String[] args)
    {
        Reader r=new Reader();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int N=r.nextInt();
        int[] values=new int[N];
        int[] costs=new int[N];
        int[] diff=new int[N];
        for(int i=0; i<N; i++)
        {
            values[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            costs[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            diff[i]=values[i]-costs[i];
        }
        Arrays.sort(diff);
        solve(out, diff);
        out.close();


    } main {
        Reader r=new Reader();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int N=r.nextInt();
        int[] values=new int[N];
        int[] costs=new int[N];
        int[] diff=new int[N];
        for(int i=0; i<N; i++)
        {
            values[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            costs[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            diff[i]=values[i]-costs[i];
        }
        Arrays.sort(diff);
        solve(out, diff);
        out.close();


    } Reader r=new Reader(); r new Reader() PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)); out new PrintWriter(new BufferedOutputStream(System.out)) int N=r.nextInt(); N r.nextInt() r.nextInt r int[] values=new int[N]; values new int[N] N int[] costs=new int[N]; costs new int[N] N int[] diff=new int[N]; diff new int[N] N for(int i=0; i<N; i++)
        {
            values[i]=r.nextInt();
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            values[i]=r.nextInt();
        } {
            values[i]=r.nextInt();
        } values[i]=r.nextInt() values[i] values i r.nextInt() r.nextInt r for(int i=0; i<N; i++)
        {
            costs[i]=r.nextInt();
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            costs[i]=r.nextInt();
        } {
            costs[i]=r.nextInt();
        } costs[i]=r.nextInt() costs[i] costs i r.nextInt() r.nextInt r for(int i=0; i<N; i++)
        {
            diff[i]=values[i]-costs[i];
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            diff[i]=values[i]-costs[i];
        } {
            diff[i]=values[i]-costs[i];
        } diff[i]=values[i]-costs[i] diff[i] diff i values[i]-costs[i] values[i] values i costs[i] costs i Arrays.sort(diff) Arrays.sort Arrays diff solve(out, diff) solve out diff out.close() out.close out String[] args args static void solve(PrintWriter out, int[] diff)
    {
        int max=0;
        for(int i=0; i<diff.length; i++) {
            if (diff[i] > 0) {
                max += diff[i];
            }
        }
        out.println(max);
    } solve {
        int max=0;
        for(int i=0; i<diff.length; i++) {
            if (diff[i] > 0) {
                max += diff[i];
            }
        }
        out.println(max);
    } int max=0; max 0 for(int i=0; i<diff.length; i++) {
            if (diff[i] > 0) {
                max += diff[i];
            }
        } int i=0; int i=0; i 0 i<diff.length i diff.length diff diff.length i++ i++ i {
            if (diff[i] > 0) {
                max += diff[i];
            }
        } {
            if (diff[i] > 0) {
                max += diff[i];
            }
        } if (diff[i] > 0) {
                max += diff[i];
            } diff[i] > 0 diff[i] diff i 0 {
                max += diff[i];
            } max += diff[i] max diff[i] diff i out.println(max) out.println out max PrintWriter out out int[] diff diff static class Reader
    {
        BufferedReader br;
        StringTokenizer st;

        public Reader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    } Reader BufferedReader br; br StringTokenizer st; st public Reader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        } Reader {
            br = new BufferedReader(new InputStreamReader(System.in));
        } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } nextLine {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } String str = ""; str "" try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = br.readLine();
            } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {
    public static void main(String[] args)
    {
        Reader r=new Reader();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int N=r.nextInt();
        int[] values=new int[N];
        int[] costs=new int[N];
        int[] diff=new int[N];
        for(int i=0; i<N; i++)
        {
            values[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            costs[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            diff[i]=values[i]-costs[i];
        }
        Arrays.sort(diff);
        solve(out, diff);
        out.close();


    }
    static void solve(PrintWriter out, int[] diff)
    {
        int max=0;
        for(int i=0; i<diff.length; i++) {
            if (diff[i] > 0) {
                max += diff[i];
            }
        }
        out.println(max);
    }

    //Fast I/O class
    static class Reader
    {
        BufferedReader br;
        StringTokenizer st;

        public Reader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }


} public class Main {
    public static void main(String[] args)
    {
        Reader r=new Reader();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int N=r.nextInt();
        int[] values=new int[N];
        int[] costs=new int[N];
        int[] diff=new int[N];
        for(int i=0; i<N; i++)
        {
            values[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            costs[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            diff[i]=values[i]-costs[i];
        }
        Arrays.sort(diff);
        solve(out, diff);
        out.close();


    }
    static void solve(PrintWriter out, int[] diff)
    {
        int max=0;
        for(int i=0; i<diff.length; i++) {
            if (diff[i] > 0) {
                max += diff[i];
            }
        }
        out.println(max);
    }

    //Fast I/O class
    static class Reader
    {
        BufferedReader br;
        StringTokenizer st;

        public Reader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }


} Main
import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args)
    {
        Reader r=new Reader();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int N=r.nextInt();
        int[] values=new int[N];
        int[] costs=new int[N];
        int[] diff=new int[N];
        for(int i=0; i<N; i++)
        {
            values[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            costs[i]=r.nextInt();
        }
        for(int i=0; i<N; i++)
        {
            diff[i]=values[i]-costs[i];
        }
        Arrays.sort(diff);
        solve(out, diff);
        out.close();


    }
    static void solve(PrintWriter out, int[] diff)
    {
        int max=0;
        for(int i=0; i<diff.length; i++) {
            if (diff[i] > 0) {
                max += diff[i];
            }
        }
        out.println(max);
    }

    //Fast I/O class
    static class Reader
    {
        BufferedReader br;
        StringTokenizer st;

        public Reader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }


}
