#include<iostream>
#include<queue>
#include<string>
using namespace std;
int enum_max_common_divisor(int a, int b)
{
for (int i = a; i >= 1; i--)
{
if (a%i == 0 && b%i == 0)
return i;
}
}
int max_common_divisor(int a, int b)
{
if (a == 0) return b;
return max_common_divisor(b%a, a);
}
int min_common_multiple(int a, int b)
{
return a * b / max_common_divisor(a, b);
}
int fib(int index)
{
if (index == 1 || index == 2) {
return 1;
}
else {
return fib(index - 1) + fib(index - 2);
}
}
int jiecheng(int index)
{
if (index == 1)return 1;
else
{
return index * jiecheng(index - 1);
}
}
int total = 0;
int a(int s, int f, int d)
{
if (s > 0)
a(s - 1, f, d * 2);
if (f > 1)
a(s, f - 1, d - 1);
if (s == 0 && f == 1 && d == 1)
total++;
return total;
}
int sum = 0;
void count(int n, int m)
{
if (n == 0 && m % 2 == 0)
sum++;
if (n < 0)
return;
count(n - 1, m + 1);
count(n - 2, m + 1);
}
char mp[30][50];
bool vis[30][50];
int dir[4][2] = { {1,0},{0,-1},{0,1}, {-1,0} };
char dirc[4] = { 'D','L','R','U' };
int n, m;
struct node {
int x;
int y;
int step;
string str;
node(int xx, int yy, int ss, string s) {
x = xx;
y = yy;
step = ss;
str = s;
}
};
queue<node> q;
bool check(int x, int y)
{
if (x < 0 || x >= n || y < 0 || y >= m || vis[x][y] || mp[x][y] == '1') {
return false;
}
return true;
}
void bfs(int x, int y)
{
q.push(node(x, y, 0, ""));
vis[x][y] = true;
while (!q.empty) {
node now = q.front();
if (now.x == n - 1 && now.y == m - 1) {
cout << now.str << endl;
cout << now.step << endl;
break;
}
q.pop();
for (int i = 0; i < 4; i++) {
int nx = now.x + dir[i][0];
int ny = now.y + dir[i][1];
if (check(nx, ny))
{
q.push(node(nx, ny, now.step + 1, now.str + dirc[i]));
vis[nx][ny] = true;
}
}
}
}
int isprime(int n)
{
if (n == 1) return 0;
int i;
for (i = 2; i*i <= n; i++)
{
if (n%i == 0)
return 0;
}
return 1;
}
int main()
{
printf("%d", a(5, 10, 2));
return 0;
}