import std;

auto input()
{
    return readln().chomp();
}

alias sread = () => readln.chomp();
alias aryread(T = long) = () => readln.split.to!(T[]);

void main()
{
    long a, b;
    scan(a, b);
    foreach (i; 0 .. 101)
    {
        foreach (j; 0 .. 101)
        {
            if ((i * 0.08 == a) && (j * 0.1 == b))
            {
                writeln(i);
                return;
            }

        }
    }
    writeln(-1);

}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}
