#include <bits/stdc++.h>
using namespace std;
int dp[108][100008], l[108], r[108], n, k;
const int maxn = 300;
int Qv[100008], Qid[100008], pos1, pos2;
void solve(int nown) {
  for (int i = 0; i <= n; i++) dp[nown][i] = dp[nown - 1][i];
  pos1 = pos2 = 0;
  for (int i = 1; i <= r[nown]; i++) {
    if (i - 1 <= n) {
      while (pos2 > pos1 && dp[nown - 1][i - 1] <= Qv[pos2 - 1]) --pos2;
      Qv[pos2] = dp[nown - 1][i - 1];
      Qid[pos2++] = i - 1;
    }
    while (pos2 > pos1 && Qid[pos1] < i - (r[nown] - l[nown])) ++pos1;
    if (pos2 > pos1) dp[nown][i] = min(dp[nown][i], Qv[pos1] + 2);
  }
  pos1 = pos2 = 0;
  for (int i = r[nown]; i >= 0; i--) {
    if (r[nown] - i <= n) {
      while (pos2 > pos1 && dp[nown - 1][r[nown] - i] <= Qv[pos2 - 1]) --pos2;
      Qv[pos2] = dp[nown - 1][r[nown] - i];
      Qid[pos2++] = r[nown] - i;
    }
    while (pos2 > pos1 && Qid[pos1] < l[nown] - i) ++pos1;
    if (pos2 > pos1) dp[nown][i] = min(dp[nown][i], Qv[pos1] + 1);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= k; i++) scanf("%d%d", &l[i], &r[i]);
  dp[0][0] = 0;
  for (int i = 1; i <= n; i++) dp[0][i] = maxn;
  for (int i = 1; i <= k; i++) solve(i);
  if (dp[k][n] == maxn)
    printf("Hungry");
  else
    printf("Full\n%d", dp[k][n]);
  return 0;
}
