#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n, k, f[2][N], q[N];
int main() {
  memset(f, 0x3f3f3f3f, sizeof(f));
  scanf("%d%d", &n, &k);
  int pre = 0, cur = 1;
  f[pre][0] = 0;
  for (int i = 1; i <= k; i++) {
    int tou = 1, wei = 0, l, r;
    scanf("%d%d", &l, &r);
    for (int j = 0; j <= r; j++) {
      if (j <= n) {
        while (tou <= wei && f[pre][j] <= f[pre][q[wei]]) wei--;
        q[++wei] = j;
      }
      while (tou <= wei && q[tou] < j - (r - l)) tou++;
      f[cur][j] = min(f[pre][j], f[pre][q[tou]] + 2);
    }
    tou = 1, wei = 0;
    for (int j = r; j >= 0; j--) {
      if (r - j <= n) {
        while (tou <= wei && f[pre][r - j] <= f[pre][q[wei]]) wei--;
        q[++wei] = r - j;
      }
      while (tou <= wei && q[tou] < l - j) tou++;
      f[cur][j] = min(f[cur][j], f[pre][q[tou]] + 1);
    }
    swap(cur, pre);
  }
  if (f[pre][n] >= 0x3f3f3f3f)
    printf("Hungry\n");
  else
    printf("Full\n%d", f[pre][n]);
  return 0;
}
