a,p;main(s){for(scanf("%d",&s);p=getchar()-10;s=p%2?s*a:s+a)scanf("%d",&a);a=!printf("%d",s);}