uses wincrt;

function formula(A,B,C:real):real;
  begin
    if (b*b-4*a*c>0) and (a<>0) then
      formula := (-b+sqrt(b*b-4*a*c))/(2*a){ + (-b-sqrt(b*b-4*a*c))/(2*a)}
    else
      formula := 0;
  end;

var a,b,c,sum:real;
    
begin
  write('A: '); readln(a);
  write('B: '); readln(b);
  write('C: '); readln(c);

  sum := formula(a,b,c) +
         formula(a,c,b) +
         formula(b,a,c) +
         formula(c,a,b) +
         formula(b,c,a) +
         formula(c,b,a);

  writeln('The useless sum is: ',sum:0:3);
end.
