/*
#include <stdio.h>
int memo[100][100]={};
int SuperSum(int k, int n)
{
if(k==0)
{
return memo[k][n];
}
else
{
return memo[k][n]=SuperSum(k-1, n)+SuperSum(k-1, n-1);
}
}
int main()
{
int k, n;
while(scanf("%d %d", &k, &n)!=EOF)
{
printf("%d\n", SuperSum(k, n));
}
return 0;
}
*/
/*
#include<stdio.h>
#include<string.h>
int stack[1000]= {};
int top=-1;
char str[500]="";
void push(int num)
{
top++;
stack[top]=num;
}
int pop()
{
if(top!=-1)
{
return stack[top--];
}
}
//void view()
//{
// printf("stack [ ");
// for(int i=0;i<=top;i++)
// printf("%d ",stack[i]);
// printf("]\n");
//}
int main()
{
int n, i,num=0, a=0, b=0;
gets(str);
for (i=0; str[i]!=0; i++)
{
if('0'<=str[i] && str[i] <='9')
{
num=num*10+str[i]-'0';
if(str[i+1]==' ')
{
push(num);
num=0;
}
}
else if(str[i]=='+')
{
a=pop();
b=pop();
push(a+b);
}
else if(str[i]=='*')
{
a=pop();
b=pop();
push(a*b);
}
else if(str[i]=='-')
{
a=pop();
b=pop();
push(b-a);
}
// view();
}
printf("%d", stack[top]);
return 0;
}
*/