#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define rep(x, to) for (int x = 0; x < (to); x++) #define REP(x, a, to) for (int x = (a); x < (to); x++) #define foreach(itr, x) for (typeof((x).begin()) itr = (x).begin(); itr != (x).end(); itr++) #define EPS (1e-14) using namespace std; typedef long long ll; typedef pair PII; typedef pair PLL; typedef complex Complex; typedef vector< vector > Mat; int A, B; int ans = 1e+9 + 7; int f(int x, int y) { if (x % y == 0) return x / y; int r = x % y; if (2 * r >= y) return x / y + 1; else return x / y; } void solve() { for (int a = 0; a <= 5000; a++) { for (int b = 0; b <= 5000; b++) { if (a == 0 && b == 0) continue; int tmpA = f(100 * a, (a + b)); int tmpB = f(100 * b, (a + b)); if (tmpA != A || tmpB != B) continue; ans = min(ans, a + b); } } cout << ans << endl; } int main() { cin >> A >> B; solve(); return 0; }