import std.stdio;
import std.algorithm;
import std.math;
import std.conv;
import std.string;

T readNum(T)(){
  return readStr.to!T;
}

T[] readNums(T)(){
  return readStr.split.to!(T[]);
}

string readStr(){
  return readln.chomp;
}

void main(){
	bool finished = false;
	auto tax = readNums!int;
	foreach(i; tax[0]/0.08 .. (tax[0]+1)/0.08+1){
		if(floor(i * 0.1) == tax[1]){
			i.writeln;
			finished = true;
			break;
		}
	}
	if(!finished){
		writeln(-1);
	}
}