#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <string>
struct tip
{
	int x, y;
};
int cmp(tip a, tip b)
{
  return (a.x > b.x);  
}
using namespace std;
int main()
{
  //freopen("in.txt", "r", stdin);
  //freopen("out.txt", "w", stdout);
  int n, m;
 tip a[333];
  cin >> n >> m;
  for(int i = 0; i < m; i++)
  {
	  cin >> a[i].x;
	  a[i].y = i + 1;
  }
  sort(a, a + m, cmp);
  int ans = 1;
  int cur = a[0].x;
 
  
  for(int i = 1; i < m ; i++)
  {
	  if (cur < n)
	  {
	  cur = cur - 2 + a[i].x;
	  ans++;
	  }
	  else 
	  {
	  cout << ans << endl;
	  for(int j = 0; j < i; j++)
		  cout << a[j].y << ' ';
	  return 0;
      }
  }
  if (cur < n)
  cout << "Epic fail";
  else
  {
	  cout << ans << endl;
	  for(int j = 0; j < m; j++)
		  cout << a[j].y << ' ';
	  return 0;
      }
} 