#include <bits/stdc++.h>
using namespace std;
bool a[4];
char s[10000];
void jh(int x,int y){
for(int i=x;i<y/2;i++){
char n;
n=s[i];
s[i]=s[y-i-1];
s[y-i-1]=n;
}
}
int main()
{
cin >>s;
int len=strlen(s);
for(int i=0;i<len;i++){
if(s[i]=='.'){
a[1]=true;
break;
}
else if(s[i]=='/'){
a[2]=true;
break;
}
else if(s[i]=='%'){
a[3]=true;
break;
}
}
if(a[1]==false && a[2]==false && a[3]==false){
a[0]=true;
}
if(a[0]==true){
jh(0,len);
}
else if(a[1]==true){
int i=0;
while(s[i]=='.'){
i++;
}
jh(0,i);
jh(i,len);
}
else if(a[2]==true){
int i=0;
while(s[i]=='/'){
i++;
}
jh(0,i);
jh(i,len);
}
else if(a[3]==true){
jh(0,len-1);
}
int qdl=0;
for(int i=0;i<len;i++){
if(s[i]=='0'){
qdl++;
}
else{
break;
}
}
for(int i=qdl;i<len;i++){
cout <<s[i];
}
return 0;
}