#include #include #include #include #include #include "math.h" #include #include #include #include #define ifor(i,a,b) for (int i=(a);i<(b);i++) #define rfor(i,a,b) for (int i=(b)-1;i>=(a);i--) #define rep(i,n) for (int i=0;i<(n);i++) #define rrep(i,n) for (int i=(n)-1;i>=0;i--) using namespace std; typedef long double ld; typedef long long int lli; typedef complex P; const double eps = 1e-11; int vex[4]={1,0,-1,0}; int vey[4]={0,1,0,-1}; typedef vector Vec; typedef vector vec; typedef vector MAT; typedef vector mat; double expr(string& ,int& ); double term(string& ,int& ); double factor(string& ,int& ); double number(string& ,int& ); double expr(string &s ,int &i ){ double val = term(s,i); while(s[i] =='+'||s[i] =='-'){ char op = s[i]; i++; double val2 = term(s,i); if(op=='+')val += val2; else val -= val2; } return val; } double term(string &s,int &i ){ double val = factor(s,i); while(s[i] =='*'||s[i]=='/'){ char op= s[i]; i++; double val2 = factor(s,i); if(op=='*')val *=val2; else val /= val2; } return val; } double factor(string &s,int &i){ if(isdigit(s[i]))return number(s,i); i++; double ret = expr(s,i); i++; return ret; } double number(string &s,int &i){ int n = s[i++]-'0'; double a = 0; int order = 1; int b=0; while(isdigit(s[i]))n=n*10+s[i++]-'0'; if(s[i]=='.'){ i++; while(isdigit(s[i])){ b = (double)(s[i++]-'0'); a += b*pow(0.1,order); order++; } } a += (double)n; return a; } int main(){ string s; int i =0; cin >>s; cout<