import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class nF {

	Scanner in;
	PrintWriter out;

	class Num implements Comparable<Num> {
		int pos;
		int value;

		Num(int pos, int value) {
			this.pos = pos;
			this.value = value;
		}

		public int compareTo(Num other) {
			return this.value - other.value;
		}
	}

	void solve() {
		int n = in.nextInt();
		int m = in.nextInt();
		Num a[] = new Num[m];
		for (int i = 0; i < m; i++) {
			a[i] = new Num(i + 1, in.nextInt());
		}
		Arrays.sort(a);
		int col = 1;
		int pos = a.length - 1;
		int sum = a[pos].value;
		ArrayList<Num> list = new ArrayList<Num>();
		list.add(a[pos]);
		pos--;
		while (pos >= 0 && sum < n) {
			sum += a[pos].value;
			sum -= 2;
			list.add(a[pos]);
			pos--;
			col++;
		}
		if (sum < n) {
			out.println("Epic fail");
		} else {
			out.println(col);
			for (Num x : list) {
				out.print(x.pos + " ");
			}
		}
	}

	void run() {
		in = new Scanner(System.in);
		out = new PrintWriter(System.out);
		try {
			solve();
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) {
		new nF().run();
	}
}
