#include <bits/stdc++.h>
using namespace std;
int l[105], r[105];
int dp[105][100005];
int temp[100005];
int q[100005][2], cntl, cntr;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= k; i++) scanf("%d%d", &l[i], &r[i]);
  k++;
  l[k] = r[k] = 2 * n;
  for (int i = 1; i <= 100005; i++) dp[0][i] = 1005;
  dp[0][0] = 0;
  for (int i = 1; i <= k; i++) {
    for (int j = 0; j <= n; j++) {
      dp[i][j] = 1005;
      if (j >= l[i] - r[i - 1])
        dp[i][j] = min(dp[i][j], dp[i - 1][j - (l[i] - r[i - 1])]);
      if (r[i - 1] >= j) dp[i][j] = min(dp[i][j], dp[i - 1][r[i - 1] - j] + 1);
    }
    if (r[i] != l[i]) {
      for (int j = 0; j <= n; j++) {
        temp[j] = 1005;
        if (j >= r[i] - l[i]) temp[j] = min(temp[j], dp[i][j - (r[i] - l[i])]);
        if (l[i] >= j) temp[j] = min(temp[j], dp[i][l[i] - j] + 1);
      }
      cntl = 0;
      cntr = 0;
      for (int j = 0; j <= n; j++) {
        if (j <= l[i]) {
          while (cntl != cntr && q[cntr][1] >= dp[i][l[i] - j] + 1) cntr--;
          cntr++;
          q[cntr][0] = j;
          q[cntr][1] = dp[i][l[i] - j] + 1;
        }
        if (cntl != cntr && q[cntl + 1][0] + r[i] - l[i] == j) cntl++;
        if (cntl != cntr) temp[j] = min(q[cntl + 1][1], temp[j]);
      }
      for (int j = 0; j <= n; j++) dp[i][j] = temp[j];
    }
  }
  if (dp[k][n] > 3 * k)
    printf("Hungry\n");
  else
    printf("Full\n%d\n", dp[k][n]);
  return 0;
}
