#include <bits/stdc++.h>
using namespace std;
int dp[2][200010], q[200010], n, k;
int main() {
  memset(dp, 0x3f3f3f3f, sizeof(dp));
  cin >> n >> k;
  dp[0][0] = 0;
  int pre = 0, cur = 1;
  for (int i = 1; i <= k; i++) {
    int h = 1, t = 0, l, r;
    scanf("%d%d", &l, &r);
    for (int j = 0; j <= r; j++) {
      if (j <= n) {
        while (h <= t && dp[pre][j] <= dp[pre][q[t]]) t--;
        q[++t] = j;
      }
      while (h <= t && q[h] < j - (r - l)) h++;
      dp[cur][j] = min(dp[pre][j], dp[pre][q[h]] + 2);
    }
    h = 1, t = 0;
    for (int j = r; j >= 0; j--) {
      if (r - j <= n) {
        while (h <= t && dp[pre][r - j] <= dp[pre][q[t]]) t--;
        q[++t] = r - j;
      }
      while (h <= t && q[h] < l - j) h++;
      dp[cur][j] = min(dp[cur][j], dp[pre][q[h]] + 1);
    }
    swap(cur, pre);
  }
  if (dp[pre][n] >= 0x3f3f3f3f)
    puts("Hungry");
  else
    printf("Full\n%d", dp[pre][n]);
  return 0;
}
