#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, l[N], r[N], g[N];
int k;
int dp[105][N][2];
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d%d", l + i, r + i);
    g[i - 1] = l[i] - r[i - 1];
  }
  for (int i = 0; i <= n; i++) {
    dp[0][i][1] = dp[0][i][0] = 300;
  }
  dp[0][0][0] = 0;
  for (int i = 1; i <= k; i++) {
    deque<int> dq1, dq2, dq3;
    int l1 = g[i - 1], l2 = r[i] - l[i];
    for (int j = 0; j <= n; j++) {
      while (!dq1.empty() and dq1.front() < j - l2) dq1.pop_front();
      while (!dq1.empty() and dp[i - 1][dq1.back()][1] >= dp[i - 1][j][1])
        dq1.pop_back();
      dq1.push_back(j);
      dp[i][j][0] = dp[i - 1][dq1.front()][1] + 1;
      dp[i][j][1] = dp[i - 1][dq1.front()][1] + 2;
      if (j - l1 - l2 >= 0)
        dp[i][j][0] = min(dp[i][j][0], dp[i - 1][j - l1 - l2][0]);
      dp[i][j][1] = min(dp[i][j][1], dp[i - 1][j][1]);
      if (j < l1) continue;
      while (!dq2.empty() and dq2.front() < j - l1 - l2) dq2.pop_front();
      while (!dq2.empty() and dp[i - 1][dq2.back()][0] >= dp[i - 1][j - l1][0])
        dq2.pop_back();
      dq2.push_back(j - l1);
      dp[i][j][0] = min(dp[i][j][0], dp[i - 1][dq2.front()][0] + 2);
      dp[i][j][1] = min(dp[i][j][1], dp[i - 1][dq2.front()][0] + 1);
    }
  }
  g[k] = 2 * n - r[k];
  int ans = dp[k][n][1];
  if (g[k] <= n) ans = min(ans, dp[k][n - g[k]][0]);
  if (ans >= 300) {
    printf("Hungry\n");
    return 0;
  }
  printf("Full\n");
  printf("%d\n", ans);
}
