int main(){ int s=0,i=1,r=-1,m=-1,c; while((c=getchar())!=-1){ if ('0'<=c){ s+=(c-'0')*i; i*=10; }else{ m=!r?(m+s):(r<0?s:(m*s)); r=c=='+'; i=1;s=0; } } printf("%d",!r?(m+s):(r<0?s:(m*s))); return 0; }