r,f,a,b,c,d,l,t,i,j,k:longint;
begin
readln(s);
l:=length(s);
for i:=1 to l do
if s[i]='=' then t:=i;
f:=1;
for i:=1 to t-1 do begin
if (ord(s[i])>=48) and (ord(s[i])<=57) then u:=u+s[i];
if (ord(s[i])>=65) and (ord(s[i])<=122) then x:=x+s[i];
if (u<>'') and ((s[i]='-') or (s[i]='+') or (i=t-1)) then begin
if x<>'' then begin
z:=x;
val(u,r);
a:=a+f*r;
x:='';
u:='';
end
else begin
val(u,r);
c:=c+f*r;
u:='';
end;
f:=1;
end;
if s[i]='-' then f:=-1;
end;
f:=1;
for i:=t+1 to l do begin
if (ord(s[i])>=48) and (ord(s[i])<=57) then u:=u+s[i];
if (ord(s[i])>=65) and (ord(s[i])<=122) then x:=x+s[i];
if (u<>'') and ((s[i]='-') or (s[i]='+') or (i=l)) then begin
if x<>'' then begin
z:=x;
val(u,r);
b:=b+f*r;
x:='';
u:='';
end
else begin
val(u,r);
d:=d+f*r;
u:='';
end;
f:=1;
end;
if s[i]='-' then f:=-1;
end;
writeln(z,'=',(d-c)/(a-b):0:3);
// writeln(a,' ',b,' ',c,' ',d);
end.