def equal(p, q, x): return q * (2 * x - 1) <= 2 * p < q * (2 * x + 1) A, B = map(int, input().split()) ans = (999999, 999999) for a in range(1000): for b in range(1000): s = a + b if s == 0: continue if equal(100 * a, s, A) and equal(100 * b, s, B) and a + b < sum(ans): ans = (a, b) print(sum(ans))