#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
int n, m;
int f[110][100010];
int q[100010], h, t, l, r;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) f[0][i] = 1e9;
  f[0][0] = 0;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &l, &r);
    h = 1, t = 0;
    for (int j = 0; j <= n; j++) f[i][j] = f[i - 1][j];
    for (int j = 0; j <= r; j++) {
      l = l;
      if (j <= n) {
        while (h <= t && f[i - 1][j] <= f[i - 1][q[t]]) t--;
        q[++t] = j;
      }
      while (h <= t && q[h] < j - (r - l)) h++;
      if (h <= t)
        l = l, l = l, f[i][j] = min(f[i][j], f[i - 1][q[h]] + 2), l = l;
    }
    h = 1, t = 0;
    for (int j = r; j >= 0; j--) {
      l = l;
      if (r - j <= n) {
        while (h <= t && f[i - 1][r - j] <= f[i - 1][q[t]]) t--;
        q[++t] = r - j;
      }
      while (h <= t && q[h] < l - j) h++;
      if (h <= t)
        l = l, l = l, f[i][j] = min(f[i][j], f[i - 1][q[h]] + 1), l = l;
    }
  }
  if (f[m][n] >= inf)
    printf("Hungry");
  else
    printf("Full\n%d", f[m][n]);
}
