#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <ctime>

using namespace std;

typedef long long int64;

#define fore(i,a,b) for (int i = (int)a; i < (int)b; i++)
#define forf(i,n) for (int i = 0; i < (int)n; i++)
#define forb(i,n) for (int i = (int)n-1; i >= 0; i--)

#define INF (int)1E9
#define INF64 (int64)1E18

struct g
{
	int num;
	int k;
};

void qs(g **a, int l, int r)
{
	int i = l;
	int j = r;
	g *y;
	int p = a[(l+r)>>1]->k;
	do
	{
		while (a[i]->k < p && i < r) i++;
		while (a[j]->k > p && j > l) j--;
		if (i <= j)
		{
			y = a[i];
			a[i] = a[j];
			a[j] = y;
			i++;
			j--;
		}
	} while (i <= j);
	if (i < r) qs(a,i,r);
	if (j > l) qs(a,l,j);
}

int main()
{
	//freopen("input.txt","rt",stdin);
	//freopen("output.txt","wt",stdout);
	int N,M,k = 0,z = 0;
	cin >> N >> M;
	g **a = new g *[M];
	forf(i,M)
	{
		a[i] = new g;
		cin >> a[i]->k;
		a[i]->num = i+1;
	}
	qs(a,0,M-1);
	forb(i,M)
	{
		if (!z) k = a[i]->k;
		else k += a[i]->k-2;
		z++;
		if (k >= N) break;
	}
	if (k >= N)
	{
		cout << z << endl;
		for (int j = M-1; j >= M-z; j--) cout << a[j]->num << " ";
		cout << endl;
	}
	else cout << "Epic fail" << endl;
	return 0;
}