#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const int BUF = 100005;
const int RANGE = 105;
int leng, nRange;
int range[RANGE][2];
void read() {
  cin >> leng >> nRange;
  for (int i = 0; i < nRange; ++i) {
    cin >> range[i][0] >> range[i][1];
  }
}
void work() {
  int dp[2][BUF];
  for (int i = 0; i < 2; ++i) {
    for (int j = 0; j <= leng; ++j) {
      dp[i][j] = INF;
    }
  }
  dp[0][0] = 0;
  for (int rangeId = 0; rangeId < nRange; ++rangeId) {
    int nextDp[2][BUF];
    for (int i = 0; i < 2; ++i) {
      for (int j = 0; j <= leng; ++j) {
        nextDp[i][j] = INF;
      }
    }
    int dt;
    dt = range[rangeId][0] - (rangeId == 0 ? 0 : range[rangeId - 1][1]);
    for (int i = 0; i <= leng; ++i) {
      if (i >= dt) {
        nextDp[0][i] = min(nextDp[0][i], dp[0][i - dt]);
      }
      nextDp[1][i] = min(nextDp[1][i], dp[1][i]);
    }
    for (int i = 0; i < 2; ++i) {
      for (int j = 0; j <= leng; ++j) {
        dp[i][j] = nextDp[i][j];
        nextDp[i][j] = INF;
      }
    }
    dt = range[rangeId][1] - range[rangeId][0];
    deque<int> DQ[2];
    for (int i = 0; i <= leng; ++i) {
      while (DQ[0].size() > 0 && DQ[0].back() > dp[0][i]) DQ[0].pop_back();
      DQ[0].push_back(dp[0][i]);
      while (DQ[1].size() > 0 && DQ[1].back() > dp[1][i]) DQ[1].pop_back();
      DQ[1].push_back(dp[1][i]);
      if (i >= dt) {
        nextDp[0][i] = min(nextDp[0][i], dp[0][i - dt]);
      }
      nextDp[1][i] = min(nextDp[1][i], dp[1][i]);
      if (DQ[1].size() > 0) nextDp[0][i] = min(nextDp[0][i], DQ[1].front() + 1);
      if (DQ[0].size() > 0) nextDp[1][i] = min(nextDp[1][i], DQ[0].front() + 1);
      if (DQ[0].size() > 0) nextDp[0][i] = min(nextDp[0][i], DQ[0].front() + 2);
      if (DQ[1].size() > 0) nextDp[1][i] = min(nextDp[1][i], DQ[1].front() + 2);
      if (DQ[0].size() > 0 && i - dt >= 0 && DQ[0].front() == dp[0][i - dt])
        DQ[0].pop_front();
      if (DQ[1].size() > 0 && i - dt >= 0 && DQ[1].front() == dp[1][i - dt])
        DQ[1].pop_front();
    }
    for (int i = 0; i < 2; ++i) {
      for (int j = 0; j <= leng; ++j) {
        dp[i][j] = nextDp[i][j];
      }
    }
  }
  int nextDp[2][BUF];
  for (int i = 0; i < 2; ++i) {
    for (int j = 0; j <= leng; ++j) {
      nextDp[i][j] = INF;
    }
  }
  int dt = leng * 2 - range[nRange - 1][1];
  for (int i = 0; i <= leng; ++i) {
    if (i >= dt) {
      nextDp[0][i] = min(nextDp[0][i], dp[0][i - dt]);
    }
    nextDp[1][i] = min(nextDp[1][i], dp[1][i]);
  }
  for (int i = 0; i < 2; ++i) {
    for (int j = 0; j <= leng; ++j) {
      dp[i][j] = nextDp[i][j];
    }
  }
  if (dp[0][leng] != INF || dp[1][leng] != INF) {
    cout << "Full" << endl;
    cout << min(dp[0][leng], dp[1][leng]) << endl;
  } else {
    cout << "Hungry" << endl;
  }
}
int main() {
  read();
  work();
  return 0;
}
