/*
* 6131:
* Splitting String into String[]
* => StringName.split("anythingHere");
* How to turn String into int (through Integer)
* => Integer.valueOf for Integer / Integer.parseInt for int
* How to NOT use (int)
* => it's only for ASCII, it doesn't change String into int
* How to print decimal places
* => printf = ("%.2f", ~~)
*/
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
String input = in.nextLine();
/*
int a = (int)(input.charAt(0));
int b = (int)(input.charAt(3));
int c = (int)(input.charAt(5));
= cannot use (int) because that's for ASCII code ㅠㅠ
*/
String method = input.substring(2, 3);
String[] findA = input.split("x");
String[] findBC = findA[1].split("=");
// splits input/findA by the "character" (deletes the character)
// and saves into String[] at index 0 and 1
// ex. inputting 5x+4=8 as String input:
// findA = 5
// findBandC = +4, 8
int a = Integer.valueOf(findA[0]);
int b = Integer.parseInt(findBC[0]);
int c = Integer.valueOf(findBC[1]);
/*
Integer.valueOf("String") (o) = used for Integer
Integer.parseInt("String") (o) = used for int
= 2 ways to get STRING into INT
= saves signs (+ and -) as well!
*/
System.out.printf("%.2f",(float)(c-b)/a);
// printf("%.3f", ~~) = 3 decimal places, etc.
}
}