#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

int main()
{
    char op[200]={};
    int k[100],t=0,a,b,i=0;
    while(scanf("%c",&op[i])!=EOF){
        if(op[i]=='\0') break;
        if ( isdigit((unsigned char)op[i]) ) {
            k[t] = op[i]-'0';
            t++;
            printf(",%d t=%d\n",op[i]-'0',t);
        }else {
            switch (op[i]){
                case '+':
                    a = k[t--]-'0';
                    b = k[t]-'0';
                    k[t] = a + b;
                    break;
                case '-':
                    a = k[t--]-'0';
                    b = k[t]-'0';
                    k[t] = a - b;
                    break;
                case '*':
                    a = k[t--]-'0';
                    b = k[t]-'0';
                    k[t] = a * b;
                    break;
                case '/':
                    a = k[t--]-'0';
                    b = k[t]-'0';
                    k[t] = a / b;
                    break;
                default:
                    break;
            }
        }
        printf("回数=%d\n",i);
        i++;
    }
    return 0;
}
