#include <bits/stdc++.h>
using namespace std;
int f[2][222222], q[222222];
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  int n = read(), k = read();
  f[0][0] = 0;
  int now = 0;
  for (int i = 1; i <= n; ++i) f[0][i] = 1000000007;
  while (k-- > 0) {
    int l = read(), r = read(), t = 1, w = 0;
    now = !now;
    memcpy(f[now], f[now ^ 1], sizeof(f[now]));
    for (int j = 0; j <= min(n, r); ++j) {
      while (t <= w && f[now ^ 1][j] < f[now ^ 1][q[w]]) w--;
      while (t <= w && q[t] < j - (r - l)) t++;
      w++;
      q[w] = j;
      if (f[now ^ 1][q[t]] + 2 < f[now][j]) f[now][j] = f[now ^ 1][q[t]] + 2;
    }
    t = 1, w = 0;
    for (int j = r; j >= 0; --j) {
      while (t <= w && f[now ^ 1][r - j] <= f[now ^ 1][q[w]]) w--;
      while (t <= w && q[t] < l - j) t++;
      w++;
      q[w] = r - j;
      if (f[now ^ 1][q[t]] + 1 < f[now][j]) f[now][j] = f[now ^ 1][q[t]] + 1;
    }
  }
  if (f[now][n] < 1000000007)
    cout << "Full" << endl << f[now][n] << endl;
  else
    cout << "Hungry" << endl;
  return 0;
}
