o,s,p;main(n){for(;~scanf("%d%c",&n,&o);p=o)printf(o-10?"%d %c ":"%d = %3$d\n",n,o,s=p%5?p%3?s+n:s*n:p%2?s-n:n);}