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

public class C219 {
	public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int n = pi(rl(in));

		int kangaroo[] = new int[n];
		boolean hidden[] = new boolean[n];
		for (int i = 0; i < n; i++) kangaroo[i] = pi(rl(in));

		Arrays.sort(kangaroo);
		int sa = 0;
		int sb = (n+1)/2;

		while (sb < n) {
			if (kangaroo[sa] * 2 <= kangaroo[sb]) {
				hidden[sa++] = true;
				sb++;
			} else {
				sb++;
			}
		}

		int count = 0;
		for (int i = 0; i < n; i++)
			count += hidden[i]?0:1;

		System.out.println(count);
	}

	private static int pi(String s) { return Integer.parseInt(s); }
	private static String rl(BufferedReader in) throws Exception { return in.readLine(); }
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * 111118315581
 *
 * -3 3 2 3 2 3 2 3 -3 3 -3 3 -3 3 2 3
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    //   public static int Mod = 1000000007;
    public static int length, node;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int n = in.nextInt();
        int[] data = new int[n];
        for (int i = 0; i < n; i++) {
            data[i] = in.nextInt();
        }
        int temp = data[0];
        data[0] = data[n - 1];
        data[n - 1]= temp;
        Arrays.sort(data);
        int mid = n/2;
        if(mid*2 < n){
            mid++;
        }
        boolean []check = new boolean[n];
        boolean found = true;
        int result = 0;
        for(int i = 0; i < n - mid && found; i++){
            found = false;
            for(int j = n - mid; j < n; j++){
                if(!check[j] && data[i]*2 <= data[j] ){
                    check[j] = true;
                    found = true;
                    break;
                }
            }
            if(!found){
                result = i;
            }
        }
        out.println(n - result);
        out.close();
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * 111118315581
 *
 * -3 3 2 3 2 3 2 3 -3 3 -3 3 -3 3 2 3
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    //   public static int Mod = 1000000007;
    public static int length, node;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int n = in.nextInt();
        int[] data = new int[n];
        for (int i = 0; i < n; i++) {
            data[i] = in.nextInt();
        }
        int temp = data[0];
        data[0] = data[n - 1];
        data[n - 1]= temp;
        Arrays.sort(data);
        int s = n / 2;
        int e = n;
        int min = n;
        while (s < e) {
            int mid = (s + e) / 2;
            boolean found = true;

            // System.out.println(mid + " " + (n - mid));
            boolean[] check = new boolean[n];
            for (int i = 0; i < n - mid && found; i++) {
                found = false;
                for (int j = n - mid; j < n; j++) {
                    if (!check[j] && data[j] >= 2 * data[i]) {
                        check[j] = true;
                        found = true;
                        break;
                    }
                }
            }
            // System.out.println(mid + " " + found);
            if (found) {
                e = mid;
                if (min > e) {
                    min = mid;
                }
            } else {
                s = mid + 1;
            }
        }
        out.println(min);
        out.close();
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * 111118315581
 *
 * -3 3 2 3 2 3 2 3 -3 3 -3 3 -3 3 2 3
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    //   public static int Mod = 1000000007;
    public static int length, node;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
         PrintWriter out = new PrintWriter(System.out);
       // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int n = in.nextInt();
        int []data = new int[n];
        for(int i = 0; i < n; i++){
            data[i] = in.nextInt();
        }
        Arrays.sort(data);
        int s = n/2;
        int e = n;
        int min = n;
        while(s < e){
            int mid = (s + e)/2;
            boolean found = true;

           // System.out.println(mid + " " + (n - mid));
            boolean []check = new boolean[n];
           for(int i = 0; i < n - mid && found; i++){
               found = false;
               for(int j = n - mid; j < n; j++){
                   if(!check[j] && data[j] >= 2*data[i]){
                       check[j] = true;
                       found= true;
                       break;
                   }
               }
           }
           // System.out.println(mid + " " + found);
            if(found){
                e = mid;
                if(min > e){
                    min = mid;
                }
            }else{
                s = mid + 1;
            }
        }
        out.println(min);
        out.close();
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
          //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

/**
 * 111118315581
 *
 * -3 3 2 3 2 3 2 3 -3 3 -3 3 -3 3 2 3
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    //   public static int Mod = 1000000007;
    public static int length, node;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int n = in.nextInt();
        int[] data = new int[n];

        for(int i = 0; i < n; i++){
            data[i] = in.nextInt();
        }
        Arrays.sort(data);
        int mid = n / 2;
        if (mid * 2 < n) {
            mid++;
        }
        int start = n - mid;
        boolean found = true;
        int result = 0;
        for (int i = 0; i < n - mid && found; i++) {
            found = false;
            for (int j = start; j < n; j++) {
                if (data[i] * 2 <= data[j]) {
                    start = j + 1;
                    found = true;
                    break;
                }
            }
            // System.out.println(data[i]);
            if (found) {
                result = i + 1;
            }else{
                result = i;
            }

        }
        out.println(n - result);
        out.close();
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

/**
 * 111118315581
 *
 * -3 3 2 3 2 3 2 3 -3 3 -3 3 -3 3 2 3
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    //   public static int Mod = 1000000007;
    public static int length, node;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int n = in.nextInt();
        int[] data = new int[n];

        for(int i = 0; i < n; i++){
            data[i] = in.nextInt();
        }
        Arrays.sort(data);
        int mid = n / 2;
        if (mid * 2 < n) {
            mid++;
        }
        int start = n - mid;
        boolean found = true;
        int result = 0;
        for (int i = 0; i < n - mid && found; i++) {
            found = false;
            for (int j = start; j < n; j++) {
                if (data[i] * 2 <= data[j]) {
                    start = i + 1;
                    found = true;
                    break;
                }
            }
            // System.out.println(data[i]);
            if (found) {
                result = i + 1;
            }else{
                result = i;
            }

        }
        out.println(n - result);
        out.close();
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * 111118315581
 *
 * -3 3 2 3 2 3 2 3 -3 3 -3 3 -3 3 2 3
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    //   public static int Mod = 1000000007;
    public static int length, node;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int n = in.nextInt();
        int[] data = new int[n];
        for (int i = 0; i < n; i++) {
            data[i] = in.nextInt();
        }
        int temp = data[0];
        data[0] = data[n - 1];
        data[n - 1] = temp;
        Arrays.sort(data);
        int mid = n / 2;
        if (mid * 2 < n) {
            mid++;
        }
        boolean[] check = new boolean[n];
        boolean found = true;
        int result = 0;
        for (int i = 0; i < n - mid && found; i++) {
            found = false;
            for (int j = n - mid; j < n; j++) {
                if (!check[j] && data[i] * 2 <= data[j]) {
                    check[j] = true;
                    found = true;
                    break;
                }
            }
            // System.out.println(data[i]);
            if (found) {
                result = i + 1;
            }else{
                result = i;
            }

        }
        out.println(n - result);
        out.close();
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

/**
 * 111118315581
 *
 * -3 3 2 3 2 3 2 3 -3 3 -3 3 -3 3 2 3
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    //   public static int Mod = 1000000007;
    public static int length, node;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int n = in.nextInt();
        int[] data = new int[n];
        PriorityQueue<Integer> q = new PriorityQueue();
        for (int i = 0; i < n; i++) {
            q.add(in.nextInt());
        }
        for(int i = 0; i < n; i++){
            data[i] = q.poll();
        }
        int mid = n / 2;
        if (mid * 2 < n) {
            mid++;
        }
        boolean[] check = new boolean[n];
        boolean found = true;
        int result = 0;
        for (int i = 0; i < n - mid && found; i++) {
            found = false;
            for (int j = n - mid; j < n; j++) {
                if (!check[j] && data[i] * 2 <= data[j]) {
                    check[j] = true;
                    found = true;
                    break;
                }
            }
            // System.out.println(data[i]);
            if (found) {
                result = i + 1;
            }else{
                result = i;
            }

        }
        out.println(n - result);
        out.close();
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

/**
 * 111118315581
 *
 * -3 3 2 3 2 3 2 3 -3 3 -3 3 -3 3 2 3
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    //   public static int Mod = 1000000007;
    public static int length, node;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int n = in.nextInt();
        int[] data = new int[n];

        for(int i = 0; i < n; i++){
            data[i] = in.nextInt();
        }
        Arrays.sort(data);
        int mid = n / 2;
        if (mid * 2 < n) {
            mid++;
        }
        int start = n - mid;
        boolean found = true;
        int result = 0;
        for (int i = 0; i < n - mid && found; i++) {
            found = false;
            for (int j = start; j < n; j++) {
                if (data[i] * 2 <= data[j]) {
                    start = i + 1;
                    found = true;
                    break;
                }
            }
            if(start == n){
                break;
            }
            // System.out.println(data[i]);
            if (found) {
                result = i + 1;
            }else{
                result = i;
            }

        }
        out.println(n - result);
        out.close();
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


var n = readline() - 0;

var a = readline().split(' ');
for (var i = 0; i < n; i++) a[i] = a[i] - 0;
a.sort(function(i, j) {
    return i - j;
});

function search(n, f) {
    var i = 0;
    var j = n;

    while (i < j) {
        var h = i + (j - i) / 2 | 0;
        if (!f(h))
            i = h + 1;
        else
            j = h;
    }

    return i;
}

var ans = search(n / 2 + 1 | 0, function(j) {
    if (j == n / 2 + 1 | 0)
        return true;

    for (var i = 0; i < j; i++)
        if (a[n - j + i] < a[i] * 2)
            return true;
    return false;
});

print(n - ans + 1);


var n = readline() - 0;

var a = readline().split(' ');
for (var i = 0; i < n; i++) a[i] = a[i] - 0;
a.sort(function(i, j) {
    return i - j;
});

function search(n, f) {
    var i = 0;
    var j = n;

    while (i < j) {
        var h = i + (j - i) / 2 | 0;
        if (!f(h))
            i = h + 1;
        else
            j = h;
    }

    return i;
}

var ans = search(n / 2 + 1 | 0, function(j) {
    if (j == n / 2 + 1 | 0)
        return true;

    for (var i = 0; i < j; i++)
        if (a[n - j + i] < a[i] * 2)
            return true;
    return false;
});

print(n - ans + 2);


var n = readline() - 0;

var a = new Array(n);
for (var i = 0; i < n; i++) a[i] = readline() - 0;
a.sort(function(i, j) {
    return i - j;
});

function search(n, f) {
    var i = 0;
    var j = n;

    while (i < j) {
        var h = i + (j - i) / 2 | 0;
        if (!f(h))
            i = h + 1;
        else
            j = h;
    }

    return i;
}

var ans = search(n / 2 + 1 | 0, function(j) {
    if (j == n / 2 + 1 | 0)
        return true;
    if (j == 0)
        return false;

    for (var i = 0; i < j; i++)
        if (a[n - j + i] < a[i] * 2)
            return true;
    return false;
});

print(n - ans + 1);


var n = readline() - 0;

var a = new Array(n);

for (var i = 0; i < n; i++) a[i] = readline() - 0;
a.sort();

function search(n, f) {
    var i = 0;
    var j = n;

    while (i < j) {
        var h = i + (j - i) / 2 | 0;
        if (!f(h))
            i = h + 1;
        else
            j = h;
    }

    return i;
}

var ans = search(n / 2 + 1 | 0, function(j) {
    if (j == n / 2 + 1 | 0) return true;
    for (var i = 0; i < j; i++)
        if (a[n - j + i] < a[i] * 2)
            return true;
    return false;
});

print(n - ans + 1);


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int n,a[100005];
	cin>>n;
	for (int i = 0; i < n; ++i)
	{
		cin>>a[i];
	}
	sort(a,a+n);
	// for (int i = 0; i < n; ++i)
	// {
	// 	cout<<a[i]<<'\t';
	// }
	int p = a[n-1]/2;
	int j;
	for (j = 0; j < n; ++j)
	{
		if(a[j]>p)
			break;

	}
	cout<<n-j;
	return 0;

}


#include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;
int main()
{
	int n,a[500000];
	scanf("%d",&n);
	for (int i = 0; i < n; ++i)
	{
		scanf("%d",&a[i]);
	}
	sort(a,a+n);
	int r = n;
	int i = 0,j = n/2;
	while((i<n/2)&&(j<n))
	{
		if(2*a[i]<=a[j])
		{
			r--;
			i++;
			j++;
		}
		else
		{
			j++;
		}

	}
	printf("%d",r);
	return 0;

}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int n,a[100005],b[100005];
	cin>>n;
	for (int i = 0; i < n; ++i)
	{
		cin>>a[i];
		b[i] = a[i];
	}
	sort(a,a+n);
	sort(b,b+n);
	// for (int i = 0; i < n; ++i)
	// {
	// 	cout<<a[i]<<'\t';
	// }
	int p = a[n-1]/2;
	int j;
	for (j = 0; j < n; ++j)
	{
		if(a[j]>p)
			break;

	}
	int r = n;
	for (int i = 1; i <= j; ++i)
	{
		if(a[n-i]>=2*a[j-i])
			r--;

	}
	cout<<r;
	return 0;

}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int n,a[100005],b[100005];
	cin>>n;
	for (int i = 0; i < n; ++i)
	{
		cin>>a[i];
		b[i] = a[i];
	}
	sort(a,a+n);
	sort(b,b+n);
	// for (int i = 0; i < n; ++i)
	// {
	// 	cout<<a[i]<<'\t';
	// }
	int p = a[n-1]/2;
	int j;
	for (j = 0; j < n; ++j)
	{
		if(a[j]>p)
			break;

	}
	int r = n;
	for (int i = 1; i <= j; ++i)
	{
		if(a[n-i]>=2*a[j-i])
			n--;

	}
	return 0;

}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int n,a[100005];
	scanf("%d",&n);
	for (int i = 0; i < n; ++i)
	{
		scanf("%d",&a[i]);
	}
	sort(a,a+n);
	int r = n;
	int i = 0,j = n/2;
	while((i<n/2)&&(j<n))
	{
		if(2*a[i]<=a[j])
		{
			r--;
			i++;
			j++;
		}
		else
		{
			j++;
		}

	}
	printf("%d",r);
	return 0;

}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int n,a[100005];
	cin>>n;
	for (int i = 0; i < n; ++i)
	{
		cin>>a[i];
	}
	sort(a,a+n);
	// for (int i = 0; i < n; ++i)
	// {
	// 	cout<<a[i]<<'\t';
	// }
	int p = a[n-1]/2;
	int j;
	for (j = 0; j < n; ++j)
	{
		if(a[j]>p)
			break;

	}
	if((n-j)>=j)
		cout<<n-j;
	else
		cout<<j;

	return 0;

}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int n,a[100005],b[100005];
	cin>>n;
	for (int i = 0; i < n; ++i)
	{
		cin>>a[i];
		b[i] = a[i];
	}
	sort(a,a+n);
	// sort(b,b+n);
	// for (int i = 0; i < n; ++i)
	// {
	// 	cout<<a[i]<<'\t';
	// }
	int r = n;
	int i = 0,j = n/2;
	while((i<n/2)&&(j<n))
	{
		if(2*a[i]<=a[j])
		{
			r--;
			i++;
			j++;
		}
		else
		{
			j++;
		}

	}
	cout<<r;
	return 0;

}


#include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;
int main()
{
	int n,a[100005];
	scanf("%d",&n);
	for (int i = 0; i < n; ++i)
	{
		scanf("%d",&a[i]);
	}
	sort(a,a+n);
	int r = n;
	int i = 0,j = n/2;
	while((i<n/2)&&(j<n))
	{
		if(2*a[i]<=a[j])
		{
			r--;
			i++;
			j++;
		}
		else
		{
			j++;
		}

	}
	printf("%d",r);
	return 0;

}


#include<iostream>
using namespace std;
#define rep(i, n1, n2) for (i=n1; i<=n2; i++)
#define drep(i, n1, n2) for (i=n2; i>=n1; i--)
int main()
{
	int i, j, s[500000], ans, n;
	cin >> n;
	ans=n;
	rep(i, 1, n) cin >> s[i];
    rep(i, 2, n)
    {
    	s[0] = s[i];
    	j = i-1;
    	while(s[0]<s[j] && j>=1)
		{
			s[j+1]=s[j];
		    j--;
        }
        s[j+1] = s[0];
	}
	i=n-1; j=n;
	while (i>0)
	{
		while (i>=1 && s[i]*2>s[j]) i--;
		if (i>=1)
		{
			ans--;
			i--;
			j--;
		}
	}
	cout << ans;
	return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define rep(i, n1, n2) for (i=n1; i<=n2; i++)
#define drep(i, n1, n2) for (i=n1; i>=n2; i--)

/*
int cmp(int a, int b)
{
    return a<b;
}
�˺������sort(s, s+n, cmp); �ɽ�s������������*/

int main()
{
    #ifdef local
       freopen("in.txt", "r", stdin);
       freopen("out.txt", "w", stdout);
    #endif
	int i, j, s[500000+3], ans, n;
	scanf("%d", &n);
	ans=n;
	rep(i, 1, n) scanf("%d", &s[i]);
    rep(i, 2, n)
    {
    	s[0] = s[i];
    	j = i-1;
    	while(s[0]<s[j] && j>=1)
		{
			s[j+1]=s[j];
		    j--;
        }
        s[j+1] = s[0];
	}
	i=n; int k=0;
	drep (j, n/2, 1)
    {
        if (s[j]*2<=s[i])
        {
            i--;
            k++;
        }
    }
    printf("%d", n-k);
	return 0;
}


#include<stdio.h>
#include<string.h>
#define rep(i, n1, n2) for (i=n1; i<=n2; i++)
#define drep(i, n1, n2) for (i=n2; i>=n1; i--)
#define local
int main()
{
	int i, j, s[500000+3], ans, n;
	scanf("%d", &n);
	ans=n;
	rep(i, 1, n) scanf("%d", &s[i]);
    rep(i, 2, n)
    {
    	s[0] = s[i];
    	j = i-1;
    	while(s[0]<s[j] && j>=1)
		{
			s[j+1]=s[j];
		    j--;
        }
        s[j+1] = s[0];
	}
	#ifdef local
	{
	  rep(i, 1, n) printf("%d ", s[i]);
	  printf("\n");
    }
    #endif
	i=n-1; j=n;
	while (i>0 && j>0)
	{
		while (i>=1 && (s[i]*2>=s[j] || s[i]==0)) i--;
		if (i>=1)
		{
			ans--;
			#ifdef local
			  printf("%d %d\n", i, j);
	        #endif
			s[i]=0;
			s[j]=0;
			i--;
			j--;
		}
		while (s[j]==0 && j>0) j--;
	}
	printf("%d", ans);
	return 0;
}


#include<stdio.h>
#include<string.h>
#define rep(i, n1, n2) for (i=n1; i<=n2; i++)
#define drep(i, n1, n2) for (i=n2; i>=n1; i--)
int main()
{
    #ifdef local
       freopen("in.txt", "r", stdin);
    #endif
	int i, j, s[500000+3], ans, n;
	scanf("%d", &n);
	ans=n;
	rep(i, 1, n) scanf("%d", &s[i]);
    rep(i, 2, n)
    {
    	s[0] = s[i];
    	j = i-1;
    	while(s[0]<s[j] && j>=1)
		{
			s[j+1]=s[j];
		    j--;
        }
        s[j+1] = s[0];
	}
	#ifdef local
	{
	  rep(i, 1, n) printf("%d ", s[i]);
	  printf("\n");
    }
    #endif
	i=n-1; j=n;
	while (i>0 && j>0)
	{
        while (i>=1 && (s[i]*2>=s[j] || s[i]==0)) i--;
		if (i>=1)
		{
			ans--;
			#ifdef local
			  printf("%d %d\n", i, j);
	        #endif
			s[i]=0;
			s[j]=0;
			i--;
			j--;
		}
		while (s[j]==0 && j>0) j--;
	}
	printf("%d", ans);
	return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define local
#define rep(i, n1, n2) for (i=n1; i<=n2; i++)
#define drep(i, n1, n2) for (i=n1; i>=n2; i--)

/*
int cmp(int a, int b)
{
    return a<b;
}
�˺������sort(s, s+n, cmp); �ɽ�s������������*/

int main()
{
    #ifdef local
       freopen("in.txt", "r", stdin);
       freopen("out.txt", "w", stdout);
    #endif
	int i, j, s[500000+3], ans, n;
	scanf("%d", &n);
	ans=n;
	rep(i, 1, n) scanf("%d", &s[i]);
    rep(i, 2, n)
    {
    	s[0] = s[i];
    	j = i-1;
    	while(s[0]<s[j] && j>=1)
		{
			s[j+1]=s[j];
		    j--;
        }
        s[j+1] = s[0];
	}
	i=n; int k=0;
	drep (j, n/2, 1)
    {
        if (s[j]*2<=s[i])
        {
            i--;
            k++;
        }
    }
    printf("%d", n-k);
	return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<algorithm>
using namespace std;
#define rep(i, n1, n2) for (i=n1; i<=n2; i++)
#define drep(i, n1, n2) for (i=n1; i>=n2; i--)

int cmp(int a, int b)
{
    return a<b;
}

int main()
{
    #ifdef local
       freopen("in.txt", "r", stdin);
       freopen("out.txt", "w", stdout);
    #endif
	int i, j, s[500000+3], ans, n;
	scanf("%d", &n);
	ans=n;
	rep(i, 0, n-1) scanf("%d", &s[i]);
	sort(s, s+n, cmp);
	i=n-1; int k=0;
	drep (j, (n-2)/2, 0)
    {
        if (s[j]*2<=s[i])
        {
            i--;
            k++;
        }
    }
    printf("%d", n-k);
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll int
static ll ans = 0, n, a[1000001],b[1000001];
int main ()
{
    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    ll q = n / 2;
    ll w = 1;
    for(int i = q; i <= n; i ++){
        for(int j = w; j <= q; j ++){
            if(a[i] - a[j] >= a[j] &&  b[j] != 1){ans ++; w = j;break;}
        }
    }
    cout <<ans;
return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll long long
int main ()
{
    ll ans = 0, n, a[111111],b[111111];
    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    ll q = n / 2;
    for(int i = q; i <= n; i ++){
        for(int j = 1; j <= q; j ++){
            if(a[i] / a[j] >= 2 &&  b[j] != 1){ans ++;b[j] = 1;break;}
        }
    }
    cout << n - ans;
return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll long long
int main ()
{
    static ll ans = 0, n, a[1000001],b[1000001];
    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    ll q = n / 2;
    for(int i = q; i <= n; i ++){
        for(int j = 1; j <= q; j ++){
            if(a[i] - a[j] >= a[j] &&  b[j] != 1){ans ++;b[j] = 1;break;}
        }
    }
    cout << n - ans;
return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll int
static ll ans = 0, n, a[1000001],b[1000001];
int main ()
{
    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    ll q = n / 2;
    for(int i = q; i <= n; i ++){
        for(int j = 1; j <= q; j ++){
            if(a[i] - a[j] >= a[j] &&  b[j] != 1){ans ++;b[j] = 1;break;}
        }
    }
    cout << n - ans;
return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll int
static ll ans = 0, n, a[1000001],b[1000001];
int main ()
{
    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    ll q = n / 2;
    for(int i = n; i >= 1; i --){
        int w = q;
        for(int j = q; j >= 1; j --){
            q --;
            if(a[i] / a[j] >= 2){
                ans ++;
                break;
            }
        }
    }
    cout << n - ans;
return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll long long
static ll ans = 0, n, a[1000001],b[1000001];
int main ()
{
    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    ll q = n / 2;
    for(int i = q; i <= n; i ++){
        for(int j = 1; j <= q; j ++){
            if(a[i] - a[j] >= a[j] &&  b[j] != 1){ans ++;b[j] = 1;break;}
        }
    }
    cout << n - ans;
return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll int
static ll ans = 0, n, a[1000001],b[1000001];
int main ()
{
    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    ll q = n / 2;
    for(int i = n; i >= 1; i --){
        int w = q;
        for(int j = q; j >= 1; j --){
            q --;
            if(a[i] / a[j] >= 2){
                ans ++;
                break;
            }
        }
    }
    cout << ans;
return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll int
static ll ans = 0, n, a[1000001],b[1000001];
int main ()
{
    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    ll q = n / 2;
    ll w = 1;
    for(int i = q; i <= n; i ++){
        for(int j = w; j <= q; j ++){
            if(a[i] - a[j] >= a[j] &&  b[j] != 1){ans ++; w = j;break;}
        }
    }
    cout << n - ans;
return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll int
static ll ans = 0, n, a[1000001],b[1000001];
int main ()
{
    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    ll q = n / 2;
    ll w = 1;
    for(int i = q; i <= n; i ++){
        for(int j = w; j <= q; j ++){
            if(a[i] - a[j] >= a[j] &&  b[j] != 1){ans ++; w = j;    break;}
        }
    }
    cout << n - ans;
return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll long long
int main ()
{
    static ll ans = 0, n, a[1000001],b[1000001];
    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    ll q = n / 2;
    for(int i = q; i <= n; i ++){
        for(int j = 1; j <= q; j ++){
            if(a[i] / a[j] >= 2 &&  b[j] != 1){ans ++;b[j] = 1;break;}
        }
    }
    cout << n - ans;
return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>

using namespace std;

int n, roos[500010];

int works(int x) {
	int req = n - x;
	int ok = 1;
	for (int i = n - req, j = 0; i < n; i++, j++) {
		if (roos[j] * 2 > roos[i])
			ok = 0;
	}
	return ok;
}

int main() {
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
		scanf("%d", roos + i);
	sort(roos, roos + n);
	int lo, hi;
	lo = (n + 1) / 2; hi = n;
	while (lo < hi) {
		int mid = (lo + hi) / 2;
		if (works(mid))
			hi = mid;
		else
			lo = mid + 1;
	}
	printf("%d\n", hi);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int n, roos[500010];

int works(int x) {
	int req = n - x;
	int ok = 1;
	for (int i = n - req, j = 0; i < n; i++, j++) {
		if (roos[j] * 2 > roos[i])
			ok = 0;
	}
	return ok;
}

int main() {
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
		scanf("%d", roos + i);
	sort(roos, roos + n);
	int lo, hi;
	lo = 0; hi = n;
	while (lo < hi) {
		int mid = (lo + hi) / 2;
		if (works(mid))
			hi = mid;
		else
			lo = mid + 1;
	}
	printf("%d\n", hi);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <set>

using namespace std;

int n, occ[100010];
multiset<int> s;

int main() {
	memset(occ, 0, sizeof(occ));
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		int tmp; scanf("%d", &tmp);
		s.insert(tmp);
		occ[tmp]++;
	}
	for (int i = 100000; i >= 0; i--) {
		while (occ[i]) {
			multiset<int>::iterator t =  (s.upper_bound((i + 1) / 2));
			if (t != s.begin())
				--t;
			else
				break;
			if (t != s.begin()) {
				s.erase(t);
				s.erase(i);
				occ[i]--;
				occ[*t]--;
				n--;
			} else
				break;
		}
	}
	printf("%d\n", n);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int n, roos[500010];

int works(int x) {
	int req = n - x;
	int ok = 1;
	for (int i = n - req, j = 0; i < n; i++, j++) {
		if (roos[j] * 2 >= roos[i])
			ok = 0;
	}
	return ok;
}

int main() {
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
		scanf("%d", roos + i);
	sort(roos, roos + n);
	int lo, hi;
	lo = 0; hi = n;
	while (lo < hi) {
		int mid = (lo + hi) / 2;
		if (works(mid))
			hi = mid;
		else
			lo = mid + 1;
	}
	printf("%d\n", hi);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>

using namespace std;

int n, roos[500010];

int works(int x) {
	int req = n - x;
	int ok = 1;
	for (int i = n - req, j = 0; i < n; i++, j++) {
		if (roos[j] * 2 >= roos[i])
			ok = 0;
	}
	return ok;
}

int main() {
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
		scanf("%d", roos + i);
	sort(roos, roos + n);
	int lo, hi;
	lo = ceil(n / 2); hi = n;
	while (lo < hi) {
		int mid = (lo + hi) / 2;
		if (works(mid))
			hi = mid;
		else
			lo = mid + 1;
	}
	printf("%d\n", hi);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>

using namespace std;

int n, roos[500010];

int works(int x) {
	int req = n - x;
	int ok = 1;
	for (int i = n - req, j = 0; i < n; i++, j++) {
		if (roos[j] * 2 > roos[i])
			ok = 0;
	}
	return ok;
}

int main() {
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
		scanf("%d", roos + i);
	sort(roos, roos + n);
	int lo, hi;
	lo = ceil(n / 2.0); hi = n;
	while (lo < hi) {
		int mid = (lo + hi) / 2;
		if (works(mid))
			hi = mid;
		else
			lo = mid + 1;
	}
	printf("%d\n", hi);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <set>

using namespace std;

int n, occ[100010];
multiset<int> s;

int main() {
	memset(occ, 0, sizeof(occ));
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		int tmp; scanf("%d", &tmp);
		s.insert(tmp);
		occ[tmp]++;
	}
	for (int i = 100000; i >= 0; i--) {
		while (occ[i]) {
			multiset<int>::iterator t =  (s.upper_bound((i + 1) / 2));
			if (t != s.begin())
				--t;
			else
				break;
			s.erase(t);
			s.erase(i);
			occ[i]--;
			occ[*t]--;
			n--;
		}
	}
	printf("%d\n", n);
	return 0;
}


#include<cstdio>
#include<cstring>
#include<vector>
#define pb push_back
using namespace std;

typedef vector<int> vi;
const int maxn = 405;
const int inf = 1<<29;

int tot,start,end;
int head[maxn],cpyh[maxn],q[maxn],d[maxn];

struct edge
{
    int from,to,next,val;
} ji[maxn*maxn];

void add(int x,int y,int w)
{
    ji[tot].from = x;
    ji[tot].to = y;
    ji[tot].val = w;
    ji[tot].next = head[x];
    head[x] = tot++;
    ji[tot].from = y;
    ji[tot].to = x;
    ji[tot].val = 0;
    ji[tot].next = head[y];
    head[y] = tot++;
}

int dinic()
{
    int max_flow = 0;
    while(true)
    {
        memset(d,-1,sizeof(d));
        int front=0,tail=0;
        q[tail++] = start;
        d[start] = 0;
        while(front<tail)
        {
            int t = q[front++];
            for(int k = head[t];k;k=ji[k].next)
            {
                int toit = ji[k].to;
                int val = ji[k].val;
                if(val&&d[toit]==-1)
                {
                    d[toit] = d[t] + 1;
                    q[tail++] = toit;
                    if(toit==end)
                    {
                        front = tail;
                        break;
                    }
                }
            }
        }
        if(d[end]==-1)
            break;
        memcpy(cpyh,head,(end+1)*sizeof(int));
        for(int i=start,top=0;;)
        {
            if(i==end)
            {
                int flow=inf,st;
                for(int k=0;k<top;k++)
                {
                    if(ji[q[k]].val<flow)
                    {
                        st = k;
                        flow = ji[q[st]].val;
                    }
                }
                for(int k=0;k<top;k++)
                {
                    ji[q[k]].val -= flow;
                    ji[q[k]^1].val +=flow;
                }
                max_flow += flow;
                top = st;
                i = ji[q[top]].from;
            }
            for(int j=cpyh[i];j;j=cpyh[i]=ji[j].next)
                if(ji[j].val>0&&d[i]+1==d[ji[j].to])
                    break;
            if(cpyh[i])
            {
                q[top++] = cpyh[i];
                i = ji[cpyh[i]].to;
            }
            else
            {
                if(top==0)
                    break;
                d[i] = -1;
                i = ji[q[--top]].from;
            }
        }
    }
    return max_flow;
}

const int maxl = 205;
const int maxp = 20005;

bool p[maxp],vis[maxl];
vi v[maxl],o;

int da[maxl],n,po;

void dfs(int x)
{
    vis[x] = 1;o[po]++;o.pb(x);
    if(!vis[v[x][0]])
        dfs(v[x][0]);
    else if(!vis[v[x][1]])
        dfs(v[x][1]);

}

void link(int x,int y)
{
    v[x].pb(y);v[y].pb(x);
}
void out()
{
    int r = 0;
    for(int i=2+2*n;i<tot;i+=2)
        if(!ji[i].val)
            link(ji[i].from,ji[i].to-n);
    for(int i=1;i<=n;i++)
    {
        if(!vis[i])
        {
            r++;
            po = o.size();o.pb(0);
            dfs(i);
        }
    }
    printf("%d\n",r);po = 0;
    while(po<o.size())
    {
        int c = o[po];
        for(int i=0;i<=c;i++)
            printf("%d%c",o[i+po],i==c?'\n':' ');
        po+=c+1;
    }
}

int main()
{
    for(int i=2;i<maxp;i++)
    {
        if(!p[i])
            for(int j=i*i;j<maxp;j+=i)
                p[j] = 1;
    }
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
        scanf("%d",da+i);
    tot = 2;end = 2*n + 1;
    for(int i=1;i<=n;i++)
    {
        if(da[i]&1)
            add(0,i,2);
        else
            add(n+i,end,2);
    }
    for(int i=1;i<=n;i++)
    {
        if(da[i]&1)
        {
            for(int j=1;j<=n;j++)
                if(!p[da[i]+da[j]])
                    add(i,n+j,1);
        }
    }
    if((n&1)||dinic()!=n)
        puts("Impossible");
    else
        out();
}


#include<cstdio>
#include<cstring>
#include<vector>
#define pb push_back
using namespace std;

typedef vector<int> vi;
const int maxn = 405;
const int inf = 1<<29;

int tot,start,end;
int head[maxn],cpyh[maxn],q[maxn],d[maxn];

struct edge
{
    int from,to,next,val;
} ji[maxn*maxn];

void add(int x,int y,int w)
{
    ji[tot].from = x;
    ji[tot].to = y;
    ji[tot].val = w;
    ji[tot].next = head[x];
    head[x] = tot++;
    ji[tot].from = y;
    ji[tot].to = x;
    ji[tot].val = 0;
    ji[tot].next = head[y];
    head[y] = tot++;
}

int dinic()
{
    int max_flow = 0;
    while(true)
    {
        memset(d,-1,sizeof(d));
        int front=0,tail=0;
        q[tail++] = start;
        d[start] = 0;
        while(front<tail)
        {
            int t = q[front++];
            for(int k = head[t];k;k=ji[k].next)
            {
                int toit = ji[k].to;
                int val = ji[k].val;
                if(val&&d[toit]==-1)
                {
                    d[toit] = d[t] + 1;
                    q[tail++] = toit;
                    if(toit==end)
                    {
                        front = tail;
                        break;
                    }
                }
            }
        }
        if(d[end]==-1)
            break;
        memcpy(cpyh,head,(end+1)*sizeof(int));
        for(int i=start,top=0;;)
        {
            if(i==end)
            {
                int flow=inf,st;
                for(int k=0;k<top;k++)
                {
                    if(ji[q[k]].val<flow)
                    {
                        st = k;
                        flow = ji[q[st]].val;
                    }
                }
                for(int k=0;k<top;k++)
                {
                    ji[q[k]].val -= flow;
                    ji[q[k]^1].val +=flow;
                }
                max_flow += flow;
                top = st;
                i = ji[q[top]].from;
            }
            for(int j=cpyh[i];j;j=cpyh[i]=ji[j].next)
                if(ji[j].val>0&&d[i]+1==d[ji[j].to])
                    break;
            if(cpyh[i])
            {
                q[top++] = cpyh[i];
                i = ji[cpyh[i]].to;
            }
            else
            {
                if(top==0)
                    break;
                d[i] = -1;
                i = ji[q[--top]].from;
            }
        }
    }
    return max_flow;
}

const int maxl = 205;
const int maxp = 20005;

bool p[maxp],vis[maxl];
vi v[maxl],o;

int da[maxl],n,po;

void dfs(int x)
{
    vis[x] = 1;o[po]++;o.pb(x);
    if(!vis[v[x][0]])
        dfs(v[x][0]);
    else if(!vis[v[x][1]])
        dfs(v[x][1]);

}

inline void link(int x,int y)
{
    v[x].pb(y);v[y].pb(x);
}
void out()
{
    int r = 0;
    for(int i=2+2*n;i<tot;i+=2)
        if(!ji[i].val)
            link(ji[i].from,ji[i].to-n);
    for(int i=1;i<=n;i++)
    {
        if(!vis[i])
        {
            r++;
            po = o.size();o.pb(0);
            dfs(i);
        }
    }
    printf("%d\n",r);po = 0;
    while(po<o.size())
    {
        int c = o[po];
        for(int i=0;i<=c;i++)
            printf("%d%c",o[i+po],i==c?'\n':' ');
        po+=c+1;
    }
}

int main()
{
    for(int i=2;i<maxp;i++)
    {
        if(!p[i])
            for(int j=i*i;j<maxp;j+=i)
                p[j] = 1;
    }
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
        scanf("%d",da+i);
    tot = 2;end = 2*n + 1;
    for(int i=1;i<=n;i++)
    {
        if(da[i]&1)
            add(0,i,2);#include<cstdio>
#include<cstring>
#include<vector>
#define pb push_back
using namespace std;

typedef vector<int> vi;
const int maxn = 405;
const int inf = 1<<29;

int tot,start,end;
int head[maxn],cpyh[maxn],q[maxn],d[maxn];

struct edge
{
    int from,to,next,val;
} ji[maxn*maxn];

void add(int x,int y,int w)
{
    ji[tot].from = x;
    ji[tot].to = y;
    ji[tot].val = w;
    ji[tot].next = head[x];
    head[x] = tot++;
    ji[tot].from = y;
    ji[tot].to = x;
    ji[tot].val = 0;
    ji[tot].next = head[y];
    head[y] = tot++;
}

int dinic()
{
    int max_flow = 0;
    while(true)
    {
        memset(d,-1,sizeof(d));
        int front=0,tail=0;
        q[tail++] = start;
        d[start] = 0;
        while(front<tail)
        {
            int t = q[front++];
            for(int k = head[t];k;k=ji[k].next)
            {
                int toit = ji[k].to;
                int val = ji[k].val;
                if(val&&d[toit]==-1)
                {
                    d[toit] = d[t] + 1;
                    q[tail++] = toit;
                    if(toit==end)
                    {
                        front = tail;
                        break;
                    }
                }
            }
        }
        if(d[end]==-1)
            break;
        memcpy(cpyh,head,(end+1)*sizeof(int));
        for(int i=start,top=0;;)
        {
            if(i==end)
            {
                int flow=inf,st;
                for(int k=0;k<top;k++)
                {
                    if(ji[q[k]].val<flow)
                    {
                        st = k;
                        flow = ji[q[st]].val;
                    }
                }
                for(int k=0;k<top;k++)
                {
                    ji[q[k]].val -= flow;
                    ji[q[k]^1].val +=flow;
                }
                max_flow += flow;
                top = st;
                i = ji[q[top]].from;
            }
            for(int j=cpyh[i];j;j=cpyh[i]=ji[j].next)
                if(ji[j].val>0&&d[i]+1==d[ji[j].to])
                    break;
            if(cpyh[i])
            {
                q[top++] = cpyh[i];
                i = ji[cpyh[i]].to;
            }
            else
            {
                if(top==0)
                    break;
                d[i] = -1;
                i = ji[q[--top]].from;
            }
        }
    }
    return max_flow;
}

const int maxl = 205;
const int maxp = 20005;

bool p[maxp],vis[maxl];
vi v[maxl],o;

int da[maxl],n,po;

void dfs(int x)
{
    vis[x] = 1;o[po]++;o.pb(x);
    if(!vis[v[x][0]])
        dfs(v[x][0]);
    else if(!vis[v[x][1]])
        dfs(v[x][1]);

}

inline void link(int x,int y)
{
    v[x].pb(y);v[y].pb(x);
}
void out()
{
    int r = 0;
    for(int i=2+2*n;i<tot;i+=2)
        if(!ji[i].val)
            link(ji[i].from,ji[i].to-n);
    for(int i=1;i<=n;i++)
    {
        if(!vis[i])
        {
            r++;
            po = o.size();o.pb(0);
            dfs(i);
        }
    }
    printf("%d\n",r);po = 0;
    while(po<o.size())
    {
        int c = o[po];
        for(int i=0;i<=c;i++)
            printf("%d%c",o[i+po],i==c?'\n':' ');
        po+=c+1;
    }
}

int main()
{
    for(int i=2;i<maxp;i++)
    {
        if(!p[i])
            for(int j=i*i;j<maxp;j+=i)
                p[j] = 1;
    }
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
        scanf("%d",da+i);
    tot = 2;end = 2*n + 1;
    for(int i=1;i<=n;i++)
    {
        if(da[i]&1)
            add(0,i,2);
        else
            add(n+i,end,2);
    }
    for(int i=1;i<=n;i++)
    {
        if(da[i]&1)
        {
            for(int j=1;j<=n;j++)
                if(!p[da[i]+da[j]])
                    add(i,n+j,1);
        }
    }
    if((n&1)||dinic()!=n)
        puts("Impossible");
    else
        out();
}

        else
            add(n+i,end,2);
    }
    for(int i=1;i<=n;i++)
    {
        if(da[i]&1)
        {
            for(int j=1;j<=n;j++)
                if(!p[da[i]+da[j]])
                    add(i,n+j,1);
        }
    }
    if((n&1)||dinic()!=n)
        puts("Impossible");
    else
        out();
}


#include<cstdio>
#include<cstring>
#include<vector>
#define pb push_back
using namespace std;

typedef vector<int> vi;
const int maxn = 405;
const int inf = 1<<29;

int tot,start,end;
int head[maxn],cpyh[maxn],q[maxn],d[maxn];

struct edge
{
    int from,to,next,val;
} ji[maxn*maxn];

void add(int x,int y,int w)
{
    ji[tot].from = x;
    ji[tot].to = y;
    ji[tot].val = w;
    ji[tot].next = head[x];
    head[x] = tot++;
    ji[tot].from = y;
    ji[tot].to = x;
    ji[tot].val = 0;
    ji[tot].next = head[y];
    head[y] = tot++;
}

int dinic()
{
    int max_flow = 0;
    while(true)
    {
        memset(d,-1,sizeof(d));
        int front=0,tail=0;
        q[tail++] = start;
        d[start] = 0;
        while(front<tail)
        {
            int t = q[front++];
            for(int k = head[t];k;k=ji[k].next)
            {
                int toit = ji[k].to;
                int val = ji[k].val;
                if(val&&d[toit]==-1)
                {
                    d[toit] = d[t] + 1;
                    q[tail++] = toit;
                    if(toit==end)
                    {
                        front = tail;
                        break;
                    }
                }
            }
        }
        if(d[end]==-1)
            break;
        memcpy(cpyh,head,(end+1)*sizeof(int));
        for(int i=start,top=0;;)
        {
            if(i==end)
            {
                int flow=inf,st;
                for(int k=0;k<top;k++)
                {
                    if(ji[q[k]].val<flow)
                    {
                        st = k;
                        flow = ji[q[st]].val;
                    }
                }
                for(int k=0;k<top;k++)
                {
                    ji[q[k]].val -= flow;
                    ji[q[k]^1].val +=flow;
                }
                max_flow += flow;
                top = st;
                i = ji[q[top]].from;
            }
            for(int j=cpyh[i];j;j=cpyh[i]=ji[j].next)
                if(ji[j].val>0&&d[i]+1==d[ji[j].to])
                    break;
            if(cpyh[i])
            {
                q[top++] = cpyh[i];
                i = ji[cpyh[i]].to;
            }
            else
            {
                if(top==0)
                    break;
                d[i] = -1;
                i = ji[q[--top]].from;
            }
        }
    }
    return max_flow;
}

const int maxl = 205;
const int maxp = 20005;

bool p[maxp],vis[maxl];
vi v[maxl],o;

int da[maxl],link[maxl],n,po;

void dfs(int x)
{
    vis[x] = 1;o[po]++;o.pb(x);
    for(int i=0;i<v[x].size();i++)
        if(!vis[v[x][i]])
            dfs(v[x][i]);
}
void out()
{
    int r = 0;
    for(int i=2+4*n;i<tot;i+=2)
        if(!ji[i].val)
            v[ji[i].from].pb(ji[i].to-n);
    for(int i=1;i<=n;i++)
    {
        if(!vis[i])
        {
            r++;
            po = o.size();o.pb(0);
            dfs(i);
        }
    }
    printf("%d\n",r);po = 0;
    while(po<o.size())
    {
        int c = o[po];
        for(int i=0;i<=c;i++)
            printf("%d%c",o[i+po],i==c?'\n':' ');
        po+=c+1;
    }
}

int main()
{
    for(int i=2;i<maxp;i++)
    {
        if(!p[i])
            for(int j=i*i;j<maxp;j+=i)
                p[j] = 1;
    }
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
        scanf("%d",da+i);
    tot = 2;end = 2*n + 1;
    for(int i=1;i<=n;i++)
    {
        add(0,i,2);add(n+i,end,2);
    }
    for(int i=1;i<=n;i++)
        for(int j=i+1;j<=n;j++)
        {
            if(!p[da[i]+da[j]])
            {
                add(i,n+j,1);
                add(j,n+i,1);
            }
        }
    if(dinic()!=n*2)
        puts("impossible");
    else
        out();
}


#include<cstdio>
#include<cstring>
#include<vector>
#define pb push_back
using namespace std;

typedef vector<int> vi;
const int maxn = 405;
const int inf = 1<<29;

int tot,start,end;
int head[maxn],cpyh[maxn],q[maxn],d[maxn];

struct edge
{
    int from,to,next,val;
} ji[maxn*maxn];

void add(int x,int y,int w)
{
    ji[tot].from = x;
    ji[tot].to = y;
    ji[tot].val = w;
    ji[tot].next = head[x];
    head[x] = tot++;
    ji[tot].from = y;
    ji[tot].to = x;
    ji[tot].val = 0;
    ji[tot].next = head[y];
    head[y] = tot++;
}

int dinic()
{
    int max_flow = 0;
    while(true)
    {
        memset(d,-1,sizeof(d));
        int front=0,tail=0;
        q[tail++] = start;
        d[start] = 0;
        while(front<tail)
        {
            int t = q[front++];
            for(int k = head[t];k;k=ji[k].next)
            {
                int toit = ji[k].to;
                int val = ji[k].val;
                if(val&&d[toit]==-1)
                {
                    d[toit] = d[t] + 1;
                    q[tail++] = toit;
                    if(toit==end)
                    {
                        front = tail;
                        break;
                    }
                }
            }
        }
        if(d[end]==-1)
            break;
        memcpy(cpyh,head,(end+1)*sizeof(int));
        for(int i=start,top=0;;)
        {
            if(i==end)
            {
                int flow=inf,st;
                for(int k=0;k<top;k++)
                {
                    if(ji[q[k]].val<flow)
                    {
                        st = k;
                        flow = ji[q[st]].val;
                    }
                }
                for(int k=0;k<top;k++)
                {
                    ji[q[k]].val -= flow;
                    ji[q[k]^1].val +=flow;
                }
                max_flow += flow;
                top = st;
                i = ji[q[top]].from;
            }
            for(int j=cpyh[i];j;j=cpyh[i]=ji[j].next)
                if(ji[j].val>0&&d[i]+1==d[ji[j].to])
                    break;
            if(cpyh[i])
            {
                q[top++] = cpyh[i];
                i = ji[cpyh[i]].to;
            }
            else
            {
                if(top==0)
                    break;
                d[i] = -1;
                i = ji[q[--top]].from;
            }
        }
    }
    return max_flow;
}

const int maxl = 205;
const int maxp = 20005;

bool p[maxp],vis[maxl];
vi v[maxl],o;

int da[maxl],link[maxl],n,po;

void dfs(int x)
{
    vis[x] = 1;o[po]++;o.pb(x);
    for(int i=0;i<v[x].size();i++)
        if(!vis[v[x][i]])
            dfs(v[x][i]);
}
void out()
{
    int r = 0;
    for(int i=2+4*n;i<tot;i+=2)
        if(!ji[i].val)
            v[ji[i].from].pb(ji[i].to-n);
    for(int i=1;i<=n;i++)
    {
        if(!vis[i])
        {
            r++;
            po = o.size();o.pb(0);
            dfs(i);
        }
    }
    printf("%d\n",r);po = 0;
    while(po<o.size())
    {
        int c = o[po];
        for(int i=0;i<=c;i++)
            printf("%d%c",o[i+po],i==c?'\n':' ');
        po+=c+1;
    }
}

int main()
{
    for(int i=2;i<maxp;i++)
    {
        if(!p[i])
            for(int j=i*i;j<maxp;j+=i)
                p[j] = 1;
    }
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
        scanf("%d",da+i);
    tot = 2;end = 2*n + 1;
    for(int i=1;i<=n;i++)
    {
        add(0,i,2);add(n+i,end,2);
    }
    for(int i=1;i<=n;i++)
        for(int j=i+1;j<=n;j++)
        {
            if(!p[da[i]+da[j]])
            {
                add(i,n+j,1);
                add(j,n+i,1);
            }
        }
    if(dinic()!=n*2)
        puts("Impossible");
    else
        out();
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=210,maxm=40010,inf=1e8;
int n,S,T,m,tot,a[maxn],lnk[maxn],son[maxm],nxt[maxm],que[maxn],w[maxm],dep[maxn],cur[maxn],fa[maxn],ans[maxn][maxn];
bool check(int x){
	int sq=sqrt(x);
	for (int i=2;i<=sq;i++) if (x%i==0) return 0;
	return 1;
}
void add(int x,int y,int z){
	son[++tot]=y,w[tot]=z,nxt[tot]=lnk[x],lnk[x]=tot;
	son[++tot]=x,w[tot]=0,nxt[tot]=lnk[y],lnk[y]=tot;
}
bool bfs(){
	int head=0,tail=1; que[tail]=S;
	memset(dep,255,sizeof(dep)); dep[S]=0;
	while (head<tail){
		head++;
		for (int j=lnk[que[head]];j!=-1;j=nxt[j])
		if (dep[son[j]]==-1&&w[j]>0) {
			dep[son[j]]=dep[que[head]]+1; que[++tail]=son[j];
		}
	}
	if (dep[T]==-1) return 0; else return 1;
}
int dfs(int x,int flow){
	if (x==T) return flow;
	for (int& j=cur[x];j!=-1;j=nxt[j])
	if (dep[son[j]]==dep[x]+1&&w[j]!=0){
		int x=dfs(son[j],min(flow,w[j]));
		if (x) {w[j]-=x; w[j^1]+=x; return x;}
	}
	return 0;
}
int dinic(){
	int ans=0;
	while (bfs()){
		for (int i=1;i<=T;i++) cur[i]=lnk[i];
		int sum; while (sum=dfs(S,inf)) ans+=sum;
	}
	return ans;
}
void find(int x,int sum){
	fa[x]=sum; ans[sum][++ans[sum][0]]=x;
	if (a[x]%2==1) {
		for (int j=lnk[x];j!=-1;j=nxt[j])
		if (w[j]==0&&!fa[son[j]]) find(son[j],sum);
	} else {
		for (int j=lnk[x];j!=-1;j=nxt[j])
		if (w[j^1]==0&&!fa[son[j]]) find(son[j],sum);
	}
}
int main(){
	tot=-1; memset(lnk,255,sizeof(lnk)); memset(nxt,255,sizeof(nxt));
	scanf("%d",&n);
	for (int i=1;i<=n;i++) scanf("%d",&a[i]);
	T=n+2,S=n+1;
	for (int i=1;i<=n;i++) if (a[i]%2==1) add(S,i,2); else add(i,T,2);
	for (int i=1;i<=n;i++)
	for (int j=1;j<=n;j++)
	if (a[i]%2==1&&a[j]%2==0&&check(a[j]+a[i])) add(i,j,1);
	int flo=dinic();
	if (flo!=n) {printf("Impossible\n"); return 0;}
	int s=0;
	for (int i=1;i<=n;i++) if (!fa[i]) find(i,++s);
	printf("%d\n",s);
	for (int i=1;i<=s;i++) {
		printf("%d ",ans[i][0]);
		for (int j=1;j<=ans[i][0];j++) printf("%d ",ans[i][j]);
		printf("\n");
	}
	return 0;
}


#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <set>
#include <cmath>
#include <cstring>
#include <bitset>
#include <deque>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

#define mp make_pair
#define pb push_back
#define bpc(a) __builtin_popcount(a)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define clr(ar,val) memset(ar, val, sizeof(ar))
#define forn(i,n) for(int i=0;i<(n);++i)
#define X first
#define Y second
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }

const int mod = 1e9 + 7;
const int inf = 1e9;

ll powm(ll a,ll p,ll m){ll r=1 % m;while(p){if(p&1)r=r*a%m;p>>=1;a=a*a%m;}return r;}

bool issimple(int d)
{
    for(int i = 2; i * i <= d; ++i)
        if(d % i == 0)
            return false;
    return true;
}

int g[210][210], n, f[210], s = 0, t, mf[210][201], uses[210];

vi path;

bool bfs()
{
    deque<int> q;
    q.pb(s);
    vi d(n + 2, -1);
    d[s] = 0;
    while(!q.empty())
    {
        int v = q.front();
        q.pop_front();
        forn(i, n + 2)
            if(g[v][i] > mf[v][i] && d[i] == -1)
            {
                d[i] = v;
                q.pb(i);
            }
    }
    if(d[t] != -1)
    {
        path.clear();
        int cur = t;
        while(cur != s)
        {
            path.pb(cur);
            cur = d[cur];
        }
        path.pb(s);
        reverse(all(path));
    }
    return d[t] != -1;
}

int main()
{
    scanf("%d", &n);
    t = n + 1;
    int odd = 0;
    forn(i, n)
    {
        scanf("%d", f + i + 1);
        if(f[i + 1] % 2 == 1)
            g[s][i + 1] = 2, odd++;
        else
            g[i + 1][t] = 2;
    }
    if(2 * odd != n)
    {
        puts("Impossible");
        return 0;
    }
    forn(i, n)
        forn(j, n)
            if(f[i + 1] % 2)
                g[i + 1][j + 1] = issimple(f[i + 1] + f[j + 1]);
    forn(i, n)
    {
        if(bfs())
        {
            forn(j, sz(path) - 1)
            {
                int u = path[j], v = path[j + 1];
                mf[u][v]++;
                mf[v][u]--;
            }
        }
        else
        {
            puts("Impossible");
            return 0;
        }
    }
    clr(uses, 0);
    vvi ans;
    forn(i, n)
        if(!uses[i + 1])
        {
            vi tmp;
            int c;
            for(c = i + 1; !uses[c];)
            {
                tmp.pb(c);
                uses[c] = 1;
                forn(j, n)
                    if(abs(mf[c][j + 1]) == 1 && !uses[j + 1])
                    {
                        c = j + 1;
                        break;
                    }
            }
            if (abs(mf[c][i+1]) != 1)
                return 1;
            ans.pb(tmp);
        }
    printf("%d\n", sz(ans));
    forn(i, sz(ans))
    {
        printf("%d", sz(ans[i]));
        forn(j, sz(ans[i]))
            printf(" %d", ans[i][j]);
        puts("");
    }
    /*forn(i, n + 2)
    {
        forn(j, n + 2)
            printf("%d ", mf[i][j]);
        puts("");
    }*/
    forn(i, n)
    {
        bool fl = false;
        forn(j, n)
            if(mf[0][i + 1] == 2)
                fl |= mf[i + 1][j + 1] == -1;
            else
                fl |= mf[i + 1][j + 1] == 1;
        if(fl)
            return 1;
    }
    return 0;
}


#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <set>
#include <cmath>
#include <cstring>
#include <bitset>
#include <deque>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

#define mp make_pair
#define pb push_back
#define bpc(a) __builtin_popcount(a)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define clr(ar,val) memset(ar, val, sizeof(ar))
#define forn(i,n) for(int i=0;i<(n);++i)
#define X first
#define Y second
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }

const int mod = 1e9 + 7;
const int inf = 1e9;

ll powm(ll a,ll p,ll m){ll r=1 % m;while(p){if(p&1)r=r*a%m;p>>=1;a=a*a%m;}return r;}

bool issimple(int d)
{
    for(int i = 2; i * i <= d; ++i)
        if(d % i == 0)
            return false;
    return true;
}

int g[210][210], n, f[210], s = 0, t, mf[210][201], uses[210];

vi path;

bool bfs()
{
    deque<int> q;
    q.pb(s);
    vi d(n + 2, -1);
    d[s] = 0;
    while(!q.empty())
    {
        int v = q.front();
        q.pop_front();
        forn(i, n + 2)
            if(g[v][i] > mf[v][i] && d[i] == -1)
            {
                d[i] = v;
                q.pb(i);
            }
    }
    if(d[t] != -1)
    {
        path.clear();
        int cur = t;
        while(cur != s)
        {
            path.pb(cur);
            cur = d[cur];
        }
        path.pb(s);
        reverse(all(path));
    }
    return d[t] != -1;
}

int main()
{
    scanf("%d", &n);
    t = n + 1;
    int odd = 0;
    forn(i, n)
    {
        scanf("%d", f + i + 1);
        if(f[i + 1] % 2 == 1)
            g[s][i + 1] = 2, odd++;
        else
            g[i + 1][t] = 2;
    }
    if(2 * odd != n)
    {
        puts("Impossible");
        return 0;
    }
    forn(i, n)
        forn(j, n)
            if(f[i + 1] % 2)
                g[i + 1][j + 1] = issimple(f[i + 1] + f[j + 1]);
    forn(i, n)
    {
        if(bfs())
        {
            forn(j, sz(path) - 1)
            {
                int u = path[j], v = path[j + 1];
                mf[u][v]++;
                mf[v][u]--;
            }
        }
        else
        {
            puts("Impossible");
            return 0;
        }
    }
    clr(uses, 0);
    vvi ans;
    forn(i, n)
        if(!uses[i + 1])
        {
            vi tmp;
            int c;
            for(c = i + 1; !uses[c];)
            {
                tmp.pb(c);
                uses[c] = 1;
                forn(j, n)
                    if(abs(mf[c][j + 1]) == 1 && !uses[j + 1])
                    {
                        c = j + 1;
                        break;
                    }
            }
            //if (abs(mf[c][i+1]) != 1)
            //    return 1;
            ans.pb(tmp);
        }
    forn(i, n)
    {
        bool fl = false;
        int cnt = 0;
        forn(j, n)
            /*if(mf[0][i + 1] == 2)
                fl |= mf[i + 1][j + 1] == -1;
            else
                fl |= mf[i + 1][j + 1] == 1;*/
            cnt += abs(mf[i + 1][j + 1]);
        if(fl || cnt != 2)
        {
            printf("%d\n", cnt);
            forn(j, n - 100)
            {
                printf("%d ", f[j+101]);
                //if ((j + 1) % 80 == 0)
                //    printf("\n");
            }
            return 1;
        }
    }
    printf("%d\n", sz(ans));
    forn(i, sz(ans))
    {
        printf("%d", sz(ans[i]));
        forn(j, sz(ans[i]))
            printf(" %d", ans[i][j]);
        puts("");
    }
    /*forn(i, n + 2)
    {
        forn(j, n + 2)
            printf("%d ", mf[i][j]);
        puts("");
    }*/

    return 0;
}


#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <set>
#include <cmath>
#include <cstring>
#include <bitset>
#include <deque>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

#define mp make_pair
#define pb push_back
#define bpc(a) __builtin_popcount(a)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define clr(ar,val) memset(ar, val, sizeof(ar))
#define forn(i,n) for(int i=0;i<(n);++i)
#define X first
#define Y second
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }

const int mod = 1e9 + 7;
const int inf = 1e9;

ll powm(ll a,ll p,ll m){ll r=1 % m;while(p){if(p&1)r=r*a%m;p>>=1;a=a*a%m;}return r;}

bool issimple(int d)
{
    for(int i = 2; i * i <= d; ++i)
        if(d % i == 0)
            return false;
    return true;
}

int g[210][210], n, f[210], s = 0, t, mf[210][201], uses[210];

vi path;

bool bfs()
{
    deque<int> q;
    q.pb(s);
    vi d(n + 2, -1);
    d[s] = 0;
    while(!q.empty())
    {
        int v = q.front();
        q.pop_front();
        forn(i, n + 2)
            if(g[v][i] > mf[v][i] && d[i] == -1)
            {
                d[i] = v;
                q.pb(i);
            }
    }
    if(d[t] != -1)
    {
        path.clear();
        int cur = t;
        while(cur != s)
        {
            path.pb(cur);
            cur = d[cur];
        }
        path.pb(s);
        reverse(all(path));
    }
    return d[t] != -1;
}

int main()
{
    scanf("%d", &n);
    t = n + 1;
    int odd = 0;
    forn(i, n)
    {
        scanf("%d", f + i + 1);
        if(f[i + 1] % 2 == 1)
            g[s][i + 1] = 2, odd++;
        else
            g[i + 1][t] = 2;
    }
    if(2 * odd != n)
    {
        puts("Impossible");
        return 0;
    }
    forn(i, n)
        forn(j, n)
            g[i + 1][j + 1] = g[j + 1][i + 1] = issimple(f[i + 1] + f[j + 1]);
    forn(i, n)
    {
        if(bfs())
        {
            forn(j, sz(path) - 1)
            {
                int u = path[j], v = path[j + 1];
                mf[u][v]++;
                mf[v][u]--;
            }
        }
        else
        {
            puts("Impossible");
            return 0;
        }
    }
    clr(uses, 0);
    vvi ans;
    forn(i, n)
        if(!uses[i + 1] && mf[s][i + 1] == 2)
        {
            vi tmp;
            for(int c = i + 1, nc = i + 1; nc != -1; c = nc)
            {
                tmp.pb(c);
                uses[c] = 1;
                nc = -1;
                forn(j, n)
                    if((mf[c][j + 1] == 1 && j % 2 == 0 || mf[c][j + 1] == -1 && j % 2 == 1) && !uses[j + 1])
                    {
                        nc = j + 1;
                        break;
                    }
            }
            ans.pb(tmp);
        }
    printf("%d\n", sz(ans));
    forn(i, sz(ans))
    {
        printf("%d", sz(ans[i]));
        forn(j, sz(ans[i]))
            printf(" %d", ans[i][j]);
        puts("");
    }
    /*forn(i, n + 2)
    {
        forn(j, n + 2)
            printf("%d ", mf[i][j]);
        puts("");
    }*/
    return 0;
}


#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <set>
#include <cmath>
#include <cstring>
#include <bitset>
#include <deque>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

#define mp make_pair
#define pb push_back
#define bpc(a) __builtin_popcount(a)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define clr(ar,val) memset(ar, val, sizeof(ar))
#define forn(i,n) for(int i=0;i<(n);++i)
#define X first
#define Y second
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }

const int mod = 1e9 + 7;
const int inf = 1e9;

ll powm(ll a,ll p,ll m){ll r=1 % m;while(p){if(p&1)r=r*a%m;p>>=1;a=a*a%m;}return r;}

bool issimple(int d)
{
    for(int i = 2; i * i <= d; ++i)
        if(d % i == 0)
            return false;
    return true;
}

int g[210][210], n, f[210], s = 0, t, mf[210][201], uses[210];

vi path;

bool bfs()
{
    deque<int> q;
    q.pb(s);
    vi d(n + 2, -1);
    d[s] = 0;
    while(!q.empty())
    {
        int v = q.front();
        q.pop_front();
        forn(i, n + 2)
            if(g[v][i] > mf[v][i] && d[i] == -1)
            {
                d[i] = v;
                q.pb(i);
            }
    }
    if(d[t] != -1)
    {
        path.clear();
        int cur = t;
        while(cur != s)
        {
            path.pb(cur);
            cur = d[cur];
        }
        path.pb(s);
        reverse(all(path));
    }
    return d[t] != -1;
}

int main()
{
    scanf("%d", &n);
    t = n + 1;
    int odd = 0;
    forn(i, n)
    {
        scanf("%d", f + i + 1);
        if(f[i + 1] % 2 == 1)
            g[s][i + 1] = 2, odd++;
        else
            g[i + 1][t] = 2;
    }
    if(2 * odd != n)
    {
        puts("Impossible");
        return 0;
    }
    forn(i, n)
        forn(j, n)
            if(f[i + 1] % 2)
                g[i + 1][j + 1] = issimple(f[i + 1] + f[j + 1]);
    forn(i, n)
    {
        if(bfs())
        {
            forn(j, sz(path) - 1)
            {
                int u = path[j], v = path[j + 1];
                mf[u][v]++;
                mf[v][u]--;
            }
        }
        else
        {
            puts("Impossible");
            return 0;
        }
    }
    clr(uses, 0);
    vvi ans;
    forn(i, n)
        if(!uses[i + 1])
        {
            vi tmp;
            int c;
            for(c = i + 1; !uses[c];)
            {
                tmp.pb(c);
                uses[c] = 1;
                forn(j, n)
                    if(abs(mf[c][j + 1]) == 1 && !uses[j + 1])
                    {
                        c = j + 1;
                        break;
                    }
            }
            //if (abs(mf[c][i+1]) != 1)
            //    return 1;
            ans.pb(tmp);
        }
    printf("%d\n", sz(ans));
    forn(i, sz(ans))
    {
        printf("%d", sz(ans[i]));
        forn(j, sz(ans[i]))
            printf(" %d", ans[i][j]);
        puts("");
    }
    /*forn(i, n + 2)
    {
        forn(j, n + 2)
            printf("%d ", mf[i][j]);
        puts("");
    }*/
    forn(i, n)
    {
        bool fl = false;
        int cnt = 0;
        forn(j, n)
            /*if(mf[0][i + 1] == 2)
                fl |= mf[i + 1][j + 1] == -1;
            else
                fl |= mf[i + 1][j + 1] == 1;*/
            cnt += abs(mf[i + 1][j + 1]);
        if(fl || cnt != 2)
            return 1;
    }
    return 0;
}


#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <set>
#include <cmath>
#include <cstring>
#include <bitset>
#include <deque>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

#define mp make_pair
#define pb push_back
#define bpc(a) __builtin_popcount(a)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define clr(ar,val) memset(ar, val, sizeof(ar))
#define forn(i,n) for(int i=0;i<(n);++i)
#define X first
#define Y second
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }

const int mod = 1e9 + 7;
const int inf = 1e9;

ll powm(ll a,ll p,ll m){ll r=1 % m;while(p){if(p&1)r=r*a%m;p>>=1;a=a*a%m;}return r;}

bool issimple(int d)
{
    for(int i = 2; i * i <= d; ++i)
        if(d % i == 0)
            return false;
    return true;
}

int g[210][210], n, f[210], s = 0, t, mf[210][201], uses[210];

vi path;

bool bfs()
{
    deque<int> q;
    q.pb(s);
    vi d(n + 2, -1);
    d[s] = 0;
    while(!q.empty())
    {
        int v = q.front();
        q.pop_front();
        forn(i, n + 2)
            if(g[v][i] > mf[v][i] && d[i] == -1)
            {
                d[i] = v;
                q.pb(i);
            }
    }
    if(d[t] != -1)
    {
        path.clear();
        int cur = t;
        while(cur != s)
        {
            path.pb(cur);
            cur = d[cur];
        }
        path.pb(s);
        reverse(all(path));
    }
    return d[t] != -1;
}

int main()
{
    scanf("%d", &n);
    t = n + 1;
    int odd = 0;
    forn(i, n)
    {
        scanf("%d", f + i + 1);
        if(f[i + 1] % 2 == 1)
            g[s][i + 1] = 2, odd++;
        else
            g[i + 1][t] = 2;
    }
    if(2 * odd != n)
    {
        puts("Impossible");
        return 0;
    }
    forn(i, n)
        forn(j, n)
            g[i + 1][j + 1] = g[j + 1][i + 1] = issimple(f[i + 1] + f[j + 1]);
    forn(i, n)
    {
        if(bfs())
        {
            forn(j, sz(path) - 1)
            {
                int u = path[j], v = path[j + 1];
                mf[u][v]++;
                mf[v][u]--;
            }
        }
        else
        {
            puts("Impossible");
            return 0;
        }
    }
    clr(uses, 0);
    vvi ans;
    forn(i, n)
        if(!uses[i + 1])
        {
            vi tmp;
            int c;
            for(c = i + 1; !uses[c]; )
            {
                tmp.pb(c);
                uses[c] = 1;
                forn(j, n)
                    if(abs(mf[c][j + 1]) == 1 && !uses[j + 1])
                    {
                        c = j + 1;
                        break;
                    }
            }
            if (c != i+1)
                return 1;
            ans.pb(tmp);
        }
    printf("%d\n", sz(ans));
    forn(i, sz(ans))
    {
        printf("%d", sz(ans[i]));
        forn(j, sz(ans[i]))
            printf(" %d", ans[i][j]);
        puts("");
    }
    /*forn(i, n + 2)
    {
        forn(j, n + 2)
            printf("%d ", mf[i][j]);
        puts("");
    }*/
    return 0;
}


#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <set>
#include <cmath>
#include <cstring>
#include <bitset>
#include <deque>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

#define mp make_pair
#define pb push_back
#define bpc(a) __builtin_popcount(a)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define clr(ar,val) memset(ar, val, sizeof(ar))
#define forn(i,n) for(int i=0;i<(n);++i)
#define X first
#define Y second
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }

const int mod = 1e9 + 7;
const int inf = 1e9;

ll powm(ll a,ll p,ll m){ll r=1 % m;while(p){if(p&1)r=r*a%m;p>>=1;a=a*a%m;}return r;}

bool issimple(int d)
{
    for(int i = 2; i * i <= d; ++i)
        if(d % i == 0)
            return false;
    return true;
}

int g[210][210], n, f[210], s = 0, t, mf[210][210], uses[210];

vi path;

bool bfs()
{
    deque<int> q;
    q.pb(s);
    vi d(n + 2, -1);
    d[s] = 0;
    while(!q.empty())
    {
        int v = q.front();
        q.pop_front();
        forn(i, n + 2)
            if(g[v][i] > mf[v][i] && d[i] == -1)
            {
                d[i] = v;
                q.pb(i);
            }
    }
    if(d[t] != -1)
    {
        path.clear();
        int cur = t;
        while(cur != s)
        {
            path.pb(cur);
            cur = d[cur];
        }
        path.pb(s);
        reverse(all(path));
    }
    return d[t] != -1;
}

int main()
{
    scanf("%d", &n);
    t = n + 1;
    int odd = 0;
    forn(i, n)
    {
        scanf("%d", f + i + 1);
        if(f[i + 1] % 2 == 1)
            g[s][i + 1] = 2, odd++;
        else
            g[i + 1][t] = 2;
    }
    if(2 * odd != n)
    {
        puts("Impossible");
        return 0;
    }
    forn(i, n)
        forn(j, n)
            if(f[i + 1] % 2)
                g[i + 1][j + 1] = issimple(f[i + 1] + f[j + 1]);
    forn(i, n)
    {
        if(bfs())
        {
            forn(j, sz(path) - 1)
            {
                int u = path[j], v = path[j + 1];
                mf[u][v]++;
                mf[v][u]--;
            }
        }
        else
        {
            puts("Impossible");
            return 0;
        }
    }
    clr(uses, 0);
    vvi ans;
    forn(i, n)
        if(!uses[i + 1])
        {
            vi tmp;
            int c;
            for(c = i + 1; !uses[c];)
            {
                tmp.pb(c);
                uses[c] = 1;
                forn(j, n)
                    if(abs(mf[c][j + 1]) == 1 && !uses[j + 1])
                    {
                        c = j + 1;
                        break;
                    }
            }
            ans.pb(tmp);
        }
    printf("%d\n", sz(ans));
    forn(i, sz(ans))
    {
        printf("%d", sz(ans[i]));
        forn(j, sz(ans[i]))
            printf(" %d", ans[i][j]);
        puts("");
    }
    return 0;
}


#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <set>
#include <cmath>
#include <cstring>
#include <bitset>
#include <deque>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

#define mp make_pair
#define pb push_back
#define bpc(a) __builtin_popcount(a)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define clr(ar,val) memset(ar, val, sizeof(ar))
#define forn(i,n) for(int i=0;i<(n);++i)
#define X first
#define Y second
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }

const int mod = 1e9 + 7;
const int inf = 1e9;

ll powm(ll a,ll p,ll m){ll r=1 % m;while(p){if(p&1)r=r*a%m;p>>=1;a=a*a%m;}return r;}

bool issimple(int d)
{
    for(int i = 2; i * i <= d; ++i)
        if(d % i == 0)
            return false;
    return true;
}

int g[210][210], n, f[210], s = 0, t, mf[210][201], uses[210];

vi path;

bool bfs()
{
    deque<int> q;
    q.pb(s);
    vi d(n + 2, -1);
    d[s] = 0;
    while(!q.empty())
    {
        int v = q.front();
        q.pop_front();
        forn(i, n + 2)
            if(g[v][i] > mf[v][i] && d[i] == -1)
            {
                d[i] = v;
                q.pb(i);
            }
    }
    if(d[t] != -1)
    {
        path.clear();
        int cur = t;
        while(cur != s)
        {
            path.pb(cur);
            cur = d[cur];
        }
        path.pb(s);
        reverse(all(path));
    }
    return d[t] != -1;
}

int main()
{
    scanf("%d", &n);
    t = n + 1;
    int odd = 0;
    forn(i, n)
    {
        scanf("%d", f + i + 1);
        if(f[i + 1] % 2 == 1)
            g[s][i + 1] = 2, odd++;
        else
            g[i + 1][t] = 2;
    }
    if(2 * odd != n)
    {
        puts("Impossible");
        return 0;
    }
    forn(i, n)
        forn(j, n)
            g[i + 1][j + 1] = g[j + 1][i + 1] = issimple(f[i + 1] + f[j + 1]);
    forn(i, n)
    {
        if(bfs())
        {
            forn(j, sz(path) - 1)
            {
                int u = path[j], v = path[j + 1];
                mf[u][v]++;
                mf[v][u]--;
            }
        }
        else
        {
            puts("Impossible");
            return 0;
        }
    }
    clr(uses, 0);
    vvi ans;
    forn(i, n)
        if(!uses[i + 1])
        {
            vi tmp;
            for(int c = i + 1; !uses[c]; )
            {
                tmp.pb(c);
                uses[c] = 1;
                forn(j, n)
                    if(abs(mf[c][j + 1]) == 1 && !uses[j + 1])
                    {
                        c = j + 1;
                        break;
                    }
            }
            if (c != i+1)
                throw;
            ans.pb(tmp);
        }
    printf("%d\n", sz(ans));
    forn(i, sz(ans))
    {
        printf("%d", sz(ans[i]));
        forn(j, sz(ans[i]))
            printf(" %d", ans[i][j]);
        puts("");
    }
    /*forn(i, n + 2)
    {
        forn(j, n + 2)
            printf("%d ", mf[i][j]);
        puts("");
    }*/
    return 0;
}