#include <bits/stdc++.h>
using namespace std;
int read() {
  int xx = 0, ff = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') ff = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    xx = xx * 10 + ch - '0';
    ch = getchar();
  }
  return xx * ff;
}
int N, K, f[110][100010];
struct Segment {
  int L, R;
} S[110];
int q[100010], head, tail;
int main() {
  N = read(), K = read();
  for (int i = 1; i <= K; i++) S[i].L = read(), S[i].R = read();
  for (int j = 0; j <= N; j++) f[0][j] = (1 << 29);
  f[0][0] = 0;
  for (int i = 1; i <= K; i++) {
    for (int j = 0; j <= N; j++) f[i][j] = f[i - 1][j];
    head = 1, tail = 0;
    for (int j = 0; j <= S[i].R; j++) {
      if (j <= N) {
        while (head <= tail && f[i - 1][j] <= f[i - 1][q[tail]]) tail--;
        q[++tail] = j;
      }
      while (head <= tail && q[head] <= j - (S[i].R - S[i].L + 1)) head++;
      if (head <= tail) f[i][j] = min(f[i][j], f[i - 1][q[head]] + 2);
    }
    head = 1, tail = 0;
    for (int j = S[i].R; j >= 0; j--) {
      if (S[i].R - j <= N) {
        while (head <= tail && f[i - 1][S[i].R - j] <= f[i - 1][q[tail]])
          tail--;
        q[++tail] = S[i].R - j;
      }
      while (head <= tail && q[head] <= S[i].L - (j + 1)) head++;
      if (head <= tail) f[i][j] = min(f[i][j], f[i][q[head]] + 1);
    }
  }
  if (f[K][N] >= (1 << 29))
    puts("Hungry");
  else {
    puts("Full");
    printf("%d\n", f[K][N]);
  }
  return 0;
}
