#include <bits/stdc++.h>
using namespace std;
int n, k, l, r, dp[2][200005], tail, head, Q[1000005];
bool now, past;
int main() {
  scanf("%d%d", &n, &k);
  now = 1, past = 0;
  memset(dp[past], 0x3f, sizeof(dp[past]));
  dp[0][0] = 0;
  while (k--) {
    memcpy(dp[now], dp[past], sizeof(dp[now]));
    scanf("%d%d", &l, &r);
    head = 1, tail = 0;
    for (int i = 0; i <= min(n, r); i++) {
      while (head <= tail && dp[past][Q[tail]] >= dp[past][i]) tail--;
      Q[++tail] = i;
      while (head <= tail && Q[head] < i - (r - l)) head++;
      dp[now][i] = min(dp[now][i], dp[past][Q[head]] + 2);
    }
    head = 1, tail = 0;
    for (int i = r; i >= 0; i--) {
      while (head <= tail && dp[past][Q[tail]] >= dp[past][r - i]) tail--;
      Q[++tail] = r - i;
      while (head <= tail && Q[head] < l - i) head++;
      dp[now][i] = min(dp[now][i], dp[past][Q[head]] + 1);
    }
    swap(now, past);
  }
  if (dp[past][n] >= 0x3f3f3f3f - 100) {
    printf("Hungry\n");
    return 0;
  } else {
    printf("Full\n");
    printf("%d\n", dp[past][n]);
  }
}
