2068 {
2069 deque<char> dq[2];
2070 stringstream ss[2];
2071 int current = 0;
2072 int limit = 1;
2073 char op = 'N';
2074 char ch;
2075 while(cin >> ch) {
2076 if(isdigit(ch) != 0) {
2077 bool flag = false;
2078 dq[current].push_front(ch);
2079 } else {
2080 op = ch;
2081 current++;
2082 }
2083 }
2084 if(op == '.' || op == '/') {
2085 limit = 2;
2086 }
2087 for(int i = 0; i < limit; i++) {
2088 while(dq[i].size() > 1 && dq[i].front() == '0') {
2089 dq[i].pop_front();
2090 }
2091 if(op == '.' && i == 1) {
2092 while(dq[i].size() > 1 && dq[i].back() == '0') {
2093 dq[i].pop_back();
2094 }
2095 }
2096 while(!dq[i].empty()) {
2097 ss[i] << dq[i].front();
2098 dq[i].pop_front();
2099 }
2100 }
2101 cout << ss[0].str();
2102 if(op != 'N') {
2103 cout << op;
2104 if(op != '%') {
2105 cout << ss[1].str();
2106 }
2107 }
2108 return 0;
2109 }