#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200010;
const int MOD = 1e9 + 7;
int cnt;
int mx = -0x3f3f3f3f, mn = 0x3f3f3f3f;
int TT, T, n, m;
int dp[2][200001];
int main() {
  int i, j, k, kk, l, r;
  int cur = 0;
  cnt = 1;
  int pre = cur ^ 1;
  int q[200010];
  int h, d;
  T = 1;
  while (T--) {
    scanf("%d %d", &n, &k);
    memset(dp, 0x3f3f3f3f, sizeof(dp));
    dp[cur][0] = 0;
    for (i = 1; i <= k; i++) {
      pre = cur;
      cur ^= 1;
      scanf("%d %d", &l, &r);
      h = 1, d = 0;
      for (j = 0; j <= r; j++) {
        if (j <= n) {
          while (h <= d && dp[pre][j] <= dp[pre][q[d]]) d--;
          q[++d] = j;
        }
        while (h <= d && (q[h] < j - r + l)) h++;
        dp[cur][j] = min(dp[pre][j], dp[pre][q[h]] + 2);
      }
      h = 1, d = 0;
      for (j = r; j >= 0; j--) {
        if (r - j <= n) {
          while (h <= d && dp[pre][r - j] <= dp[pre][q[d]]) d--;
          q[++d] = r - j;
        }
        while (h <= d && (q[h] < l - j)) h++;
        dp[cur][j] = min(dp[cur][j], dp[pre][q[h]] + 1);
      }
    }
    if (dp[cur][n] >= 0x3f3f3f3f)
      puts("Hungry");
    else
      printf("Full\n%d\n", dp[cur][n]);
  }
  return 0;
}
