using System; public class Hello { public static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var a = int.Parse(line[0]); var b = int.Parse(line[1]); Console.WriteLine(getAns(a, b)); } public static int getAns(int a, int b) { if (b < a) return getAns(b, a); for (int i = 0; i <= 100; i++) for (int j = 1; j <= 100; j++) { var w1 = 100d * i / (i + j); var r1 = Math.Round(w1, 0, MidpointRounding.AwayFromZero); var w2 = 100d * j / (i + j); var r2 = Math.Round(w2, 0, MidpointRounding.AwayFromZero); if (r1 == a && r2 == b) return i + j; } return 0; } }