function Main(input) {
	input = input.split(" ");

	var A = input[0];
	var B = input[1];

	var t8 = 0.08;
	var t10 = 0.1;

	var taxA = Math.ceil(A / t8);
	var taxB = Math.ceil(B / t10);
	var noTax;

	if(taxA <= taxB && taxB <= (taxA + 12) ||
	taxB <= taxA && taxA <= (taxB + 10)) {
		noTax = (taxA > taxB) ? taxA : taxB;
		console.log(noTax);
	} else {
		console.log(-1);
	}
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));