inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
l = inp.shift().split(" ")
A = l.shift() * 1
B = l.shift() * 1
ans = -1
for (i=0; i<=10000; i++) {
    if (Math.floor(i*0.08) == A && Math.floor(i*0.1) == B) {
        ans = i;
        break;
    }
}
console.log(ans)