int main(){ int a,s,p; scanf("%d",&s); while(p=getchar()-10){ scanf("%d",&a); if(p-32)s*=a;else s+=a; } printf("%d",s); return 0; }