#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll getrnd(ll l, ll r) { return uniform_int_distribution<ll>(l, r)(rng); }
template <typename T1, typename T2>
inline bool relax(T1& a, const T2& b) {
  return a > b ? a = b, true : false;
}
template <typename T1, typename T2>
inline bool strain(T1& a, const T2& b) {
  return a < b ? a = b, true : false;
}
const int N = 1e5 + 3, K = 103;
int dp[K][N], l[K], r[K];
struct min_queue {
  deque<int> q;
  min_queue() {}
  void push(int x) {
    while (!q.empty() && q.back() > x) q.pop_back();
    q.push_back(x);
  }
  int getmin() {
    if (q.empty()) return 1e9;
    return q.front();
  }
  void pop(int x) {
    if (!q.empty() && q.front() == x) q.pop_front();
  }
};
void solve() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < k; ++i) cin >> l[i] >> r[i];
  l[k] = r[k] = 2 * n;
  for (int i = 0; i < K; ++i)
    for (int j = 0; j < N; ++j) dp[i][j] = 1e9;
  if (l[0] <= n) dp[0][l[0]] = 0;
  for (int i = 1; i <= k; ++i) {
    min_queue q1, q2;
    for (int x = 0; x < (r[i - 1] - l[i - 1]); ++x)
      if (l[i] - x >= 0) q1.push(dp[i - 1][l[i] - x]);
    for (int x = 1; x <= (r[i - 1] - l[i - 1] - 1); ++x)
      if (-(l[i] - r[i - 1]) - x >= 0)
        q2.push(dp[i - 1][-(l[i] - r[i - 1]) - x]);
    for (int t = 0; t <= n; ++t) {
      if (t - (l[i] - l[i - 1]) >= 0)
        relax(dp[i][t], dp[i - 1][t - (l[i] - l[i - 1])]);
      if (r[i - 1] - l[i - 1] - 1 >= 0) {
        if (t - (l[i] - r[i - 1]) >= 0)
          q2.push(dp[i - 1][t - (l[i] - r[i - 1])]);
        relax(dp[i][t], 2 + q2.getmin());
        if (t - (l[i] - r[i - 1]) - (r[i - 1] - l[i - 1] - 1) >= 0)
          q2.pop(dp[i - 1][t - (l[i] - r[i - 1]) - (r[i - 1] - l[i - 1] - 1)]);
      }
      if (l[i] - t - (r[i - 1] - l[i - 1]) >= 0)
        q1.push(dp[i - 1][l[i] - t - (r[i - 1] - l[i - 1])]);
      relax(dp[i][t], 1 + q1.getmin());
      if (l[i] - t >= 0) q1.pop(dp[i - 1][l[i] - t]);
    }
  }
  int res = dp[k][n];
  if (res > 1e7)
    cout << "Hungry\n";
  else
    cout << "Full\n" << res << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  srand(time(0));
  int t = 1;
  while (t--) solve();
  return 0;
}
