from decimal import * A, B = map(int, input().split()) ans = 10**18 for a in range(1005): for b in range(1005): if a + b == 0: continue x = Decimal(100 * a)/(a + b) x = x.quantize(Decimal('0'), rounding=ROUND_HALF_UP) y = Decimal(100 * b)/(a + b) y = y.quantize(Decimal('0'), rounding=ROUND_HALF_UP) if x == A and y == B: ans = min(ans, a + b) print(ans)