#include <iostream>
using namespace std;
int solution(int N, int M, int wine)
{
if (M == 0 && N == 0 && wine == 0)
{
return 1;
}
else if (N < 0 || M < 0)
{
return 0;
}
return solution(N - 1, M, wine * 2) + solution(N, M - 1, wine - 1);
}
int main()
{
int N = 5, M = 10;
cout << solution(N, M, 2) << endl;
}