from decimal import Decimal, ROUND_HALF_UP a, b = map(int, input().split()) ans = 10000 for i in range(101): for j in range(101): if i == 0 and j == 0: continue ii = Decimal(str(i)) jj = Decimal(str(j)) ra = 100 * ii / (ii + jj) rb = 100 * jj / (ii + jj) ra = ra.quantize(Decimal('0'), rounding=ROUND_HALF_UP) rb = rb.quantize(Decimal('0'), rounding=ROUND_HALF_UP) if ra == a and rb == b: ans = min(ans, i + j) print(ans)