#include <bits/stdc++.h>
using namespace std;
void read(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -f;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  x *= f;
}
int n, k, q[200005], f[2][200005];
int main() {
  read(n);
  read(k);
  memset(f, 0X7F7F7F7F, sizeof(f));
  f[0][0] = 0;
  int x, y, l, r;
  x = 0;
  y = 1;
  for (int i = 1; i <= k; i++) {
    read(l);
    read(r);
    int t, w;
    t = 1;
    w = 0;
    for (int j = 0; j <= r; j++) {
      if (j <= n) {
        while (t <= w && f[x][j] <= f[x][q[w]]) w--;
        q[++w] = j;
      }
      while (t <= w && q[t] < j - (r - l)) t++;
      f[y][j] = min(f[x][j], f[y][q[t]] + 2);
    }
    t = 1;
    w = 0;
    for (int j = r; j >= 0; j--) {
      if (r - j <= n) {
        while (t <= w && f[x][r - j] <= f[x][q[w]]) w--;
        q[++w] = r - j;
      }
      while (t <= w && q[t] < l - j) t++;
      f[y][j] = min(f[y][j], f[x][q[t]] + 1);
    }
    swap(x, y);
  }
  if (f[x][n] == 0X7F7F7F7F)
    puts("Hungry");
  else
    printf("Full\n%d\n", f[x][n]);
  return 0;
}
