#include<bits/stdc++.h>
using namespace std;
int main()
{
char a;
int fh=1;
double xs1=0,xs2=0;
double cs1=0,cs2=0;
int temp=0;
char x;
while(1)
{
a=getchar();
if(a=='='){
cs1+=temp;
break;
}
else if(a=='-')
{
fh=0;
cs1+=temp;
temp=0;
}
else if(a=='+'){
fh=1;
cs1+=temp;
temp=0;
}
else if(a>='0'&&a<='9')
{
if(fh)
temp=temp*10+int(a-48);
else
temp=temp*10-int(a-48);
}
else
{
xs1+=temp;
temp=0;
x=a;
}
}
temp=0;
fh=1;
while(1)
{
cin.get(a);
if(a=='\n'){
cs2+=temp;
break;
}
else if(a=='-')
{
fh=0;
cs2+=temp;
temp=0;
}
else if(a=='+'){
fh=1;
cs2+=temp;
temp=0;
}
else if(a>='0'&&a<='9')
{
if(fh)
temp=temp*10+int(a-48);
else
temp=temp*10-int(a-48);
}
else
{
xs2+=temp;
temp=0;
x=a;
}
}
double ans;
ans=(cs1-cs2)/(xs2-xs1);
cout<<x<<"=";
printf("%.3lf",ans);
return 0;
}