#include #include #include int main() { char s[128], t[128]; while (~scanf("%s", s)) { strcpy(t, s); char* p=strtok(s, "+*"); int res=atoi(p); while (p=strtok(0, "+*")) { int x=atoi(p); if (t[p-s-1]=='+') res*=x; else res+=x; } printf("%d\n", res); } }