#include <bits/stdc++.h>
using namespace std;
int dp[3][200000], q[200000], n, k;
inline int read() {
  register int s = 0, w = 1;
  register char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    s = (s << 3) + (s << 1) + (ch ^ 48);
    ch = getchar();
  }
  return s * w;
}
int main() {
  n = read(), k = read();
  memset(dp, 0x3f3f3f, sizeof dp);
  dp[0][0] = 0;
  for (register int i = 1; i <= k; i++) {
    int head = 1, tail = 0, l = read(), r = read();
    for (register int j = 0; j <= r; j++) {
      if (j <= n) {
        while (head <= tail && dp[(i + 1) % 2][j] <= dp[(i + 1) % 2][q[tail]])
          tail--;
        q[++tail] = j;
      }
      while (head <= tail && q[head] < j - (r - l)) head++;
      dp[i % 2][j] = min(dp[(i + 1) % 2][j], dp[(i + 1) % 2][q[head]] + 2);
    }
    head = 1, tail = 0;
    for (register int j = r; j >= 0; j--) {
      if (r - j <= n) {
        while (head <= tail &&
               dp[(i + 1) % 2][r - j] <= dp[(i + 1) % 2][q[tail]])
          tail--;
        q[++tail] = r - j;
      }
      while (head <= tail && q[head] < l - j) head++;
      dp[i % 2][j] = min(dp[i % 2][j], dp[(i + 1) % 2][q[head]] + 1);
    }
  }
  if (dp[k % 2][n] >= 0x3f3f3f)
    puts("Hungry");
  else
    printf("Full\n%d", dp[k % 2][n]);
  return 0;
}
