static int get_height_helper(int[][] F, int c, int d) {
		if (d == 0) {
			return 0;
		} else if (c == 1) {
			return d;
		} else {
			if (F[c][d] == -1) {
				F[c][d] = get_height_helper(F, c, d - 1)
						+ get_height_helper(F, c - 1, d - 1) + 1;
			}
			return F[c][d];
		}
	}