#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import decimal
import itertools


MAX_CAND = 500


def solve(a0, b0):
    answer = None
    with decimal.localcontext() as context:
        context.rounding = decimal.ROUND_HALF_UP
        answer = decimal.Decimal("Inf")
        gen = (context.create_decimal(i) for i in range(MAX_CAND))
        for a, b in itertools.product(gen, repeat=2):
            if a == b == 0:
                continue
            cond_a = context.quantize(100 * a / (a + b), 0) == a0
            cond_b = context.quantize(100 * b / (a + b), 0) == b0
            if cond_a and cond_b:
                answer = min(answer, int(a + b))
    return answer


def main():
    a0, b0 = map(int, input().split())
    print(solve(a0, b0))


if __name__ == '__main__':
    main()