#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, w = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
  return x * w;
}
int n, k, l1, r1, l2, r2;
int dp[110][200010], l[110], r[110], team1[200010], team2[200010];
int main() {
  n = read();
  k = read();
  memset(dp, 0x3f, sizeof(dp));
  for (int i = 1; i <= k; i++) l[i] = read(), r[i] = read();
  dp[0][0] = 0;
  for (int i = 1; i <= k; i++) {
    l1 = 1;
    r1 = 0;
    memset(team1, 0, sizeof(team1));
    memset(team2, 0, sizeof(team2));
    for (int j = r[i]; j >= l[i]; j--) {
      while (l1 <= r1 && dp[i - 1][j] <= dp[i - 1][team1[r1]]) r1--;
      team1[++r1] = j;
    }
    for (int j = 0; j <= min(n, r[i]); j++) {
      dp[i][j] = dp[i - 1][j];
      while (l1 <= r1 && team1[l1] > r[i] - j) l1++;
      if (l[i] - j >= 0) {
        while (l1 <= r1 && dp[i - 1][team1[r1]] >= dp[i - 1][l[i] - j]) r1--;
        team1[++r1] = l[i] - j;
      }
      if (l1 <= r1) dp[i][j] = min(dp[i][j], dp[i - 1][team1[l1]] + 1);
    }
    l2 = 1;
    r2 = 0;
    for (int j = 0; j <= min(n, r[i]); j++) {
      while (l2 <= r2 && team2[l2] < j - r[i] + l[i]) l2++;
      while (l2 <= r2 && dp[i - 1][team2[r2]] >= dp[i - 1][j]) r2--;
      team2[++r2] = j;
      dp[i][j] = min(dp[i][j], dp[i - 1][team2[l2]] + 2);
    }
  }
  if (dp[k][n] != dp[0][1])
    cout << "Full\n" << dp[k][n] << endl;
  else
    cout << "Hungry";
}
