import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next()) + 1;
        int y = Integer.parseInt(sc.next());
        int z = Integer.parseInt(sc.next());
        HashSet<Integer> set = new HashSet<>();
        for (int i = 0; i < y; i++) {
            set.add(Integer.parseInt(sc.next()));
        }
        HashMap<Integer, Boolean> map = new HashMap<>();
        for (int i = 0; i < x; i++) {
            if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            }
        }
        int first_half = 0;
        int last_half = 0;
        for (int i = 0; i < x; i++) {
            if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            }
        }
        System.out.println(Math.min(first_half, last_half));
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next()) + 1;
        int y = Integer.parseInt(sc.next());
        int z = Integer.parseInt(sc.next());
        HashSet<Integer> set = new HashSet<>();
        for (int i = 0; i < y; i++) {
            set.add(Integer.parseInt(sc.next()));
        }
        HashMap<Integer, Boolean> map = new HashMap<>();
        for (int i = 0; i < x; i++) {
            if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            }
        }
        int first_half = 0;
        int last_half = 0;
        for (int i = 0; i < x; i++) {
            if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            }
        }
        System.out.println(Math.min(first_half, last_half));
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next()) + 1;
        int y = Integer.parseInt(sc.next());
        int z = Integer.parseInt(sc.next());
        HashSet<Integer> set = new HashSet<>();
        for (int i = 0; i < y; i++) {
            set.add(Integer.parseInt(sc.next()));
        }
        HashMap<Integer, Boolean> map = new HashMap<>();
        for (int i = 0; i < x; i++) {
            if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            }
        }
        int first_half = 0;
        int last_half = 0;
        for (int i = 0; i < x; i++) {
            if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            }
        }
        System.out.println(Math.min(first_half, last_half));
    } main {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next()) + 1;
        int y = Integer.parseInt(sc.next());
        int z = Integer.parseInt(sc.next());
        HashSet<Integer> set = new HashSet<>();
        for (int i = 0; i < y; i++) {
            set.add(Integer.parseInt(sc.next()));
        }
        HashMap<Integer, Boolean> map = new HashMap<>();
        for (int i = 0; i < x; i++) {
            if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            }
        }
        int first_half = 0;
        int last_half = 0;
        for (int i = 0; i < x; i++) {
            if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            }
        }
        System.out.println(Math.min(first_half, last_half));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = Integer.parseInt(sc.next()) + 1; x Integer.parseInt(sc.next()) + 1 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc 1 int y = Integer.parseInt(sc.next()); y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int z = Integer.parseInt(sc.next()); z Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc HashSet<Integer> set = new HashSet<>(); set new HashSet<>() for (int i = 0; i < y; i++) {
            set.add(Integer.parseInt(sc.next()));
        } int i = 0; int i = 0; i 0 i < y i y i++ i++ i {
            set.add(Integer.parseInt(sc.next()));
        } {
            set.add(Integer.parseInt(sc.next()));
        } set.add(Integer.parseInt(sc.next())) set.add set Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc HashMap<Integer, Boolean> map = new HashMap<>(); map new HashMap<>() for (int i = 0; i < x; i++) {
            if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            }
        } int i = 0; int i = 0; i 0 i < x i x i++ i++ i {
            if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            }
        } {
            if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            }
        } if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            } set.contains(i) set.contains set i {
                map.put(i, true);
            } map.put(i, true) map.put map i true {
                map.put(i, false);
            } map.put(i, false) map.put map i false int first_half = 0; first_half 0 int last_half = 0; last_half 0 for (int i = 0; i < x; i++) {
            if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            }
        } int i = 0; int i = 0; i 0 i < x i x i++ i++ i {
            if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            }
        } {
            if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            }
        } if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            } i <= z i z {
                if (map.get(i)) first_half++;
            } if (map.get(i)) first_half++; map.get(i) map.get map i first_half++ first_half {
                if (map.get(i)) last_half++;
            } if (map.get(i)) last_half++; map.get(i) map.get map i last_half++ last_half System.out.println(Math.min(first_half, last_half)) System.out.println System.out System System.out Math.min(first_half, last_half) Math.min Math first_half last_half String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next()) + 1;
        int y = Integer.parseInt(sc.next());
        int z = Integer.parseInt(sc.next());
        HashSet<Integer> set = new HashSet<>();
        for (int i = 0; i < y; i++) {
            set.add(Integer.parseInt(sc.next()));
        }
        HashMap<Integer, Boolean> map = new HashMap<>();
        for (int i = 0; i < x; i++) {
            if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            }
        }
        int first_half = 0;
        int last_half = 0;
        for (int i = 0; i < x; i++) {
            if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            }
        }
        System.out.println(Math.min(first_half, last_half));
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next()) + 1;
        int y = Integer.parseInt(sc.next());
        int z = Integer.parseInt(sc.next());
        HashSet<Integer> set = new HashSet<>();
        for (int i = 0; i < y; i++) {
            set.add(Integer.parseInt(sc.next()));
        }
        HashMap<Integer, Boolean> map = new HashMap<>();
        for (int i = 0; i < x; i++) {
            if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            }
        }
        int first_half = 0;
        int last_half = 0;
        for (int i = 0; i < x; i++) {
            if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            }
        }
        System.out.println(Math.min(first_half, last_half));
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next()) + 1;
        int y = Integer.parseInt(sc.next());
        int z = Integer.parseInt(sc.next());
        HashSet<Integer> set = new HashSet<>();
        for (int i = 0; i < y; i++) {
            set.add(Integer.parseInt(sc.next()));
        }
        HashMap<Integer, Boolean> map = new HashMap<>();
        for (int i = 0; i < x; i++) {
            if (set.contains(i)) {
                map.put(i, true);
            } else {
                map.put(i, false);
            }
        }
        int first_half = 0;
        int last_half = 0;
        for (int i = 0; i < x; i++) {
            if (i <= z) {
                if (map.get(i)) first_half++;
            } else {
                if (map.get(i)) last_half++;
            }
        }
        System.out.println(Math.min(first_half, last_half));
    }
}
