using System.Numerics; public class Program { public static void Main() { //BigInteger num = BigInteger.Parse(Console.ReadLine() ?? string.Empty); //int num = int.Parse(Console.ReadLine() ?? string.Empty); string[] moji = (Console.ReadLine() ?? string.Empty).Trim().Split(' '); //string str = Console.ReadLine() ?? string.Empty; long A = long.Parse(moji[0]); long B = long.Parse(moji[1]); long C = long.Parse(moji[2]); A *= 60; C = C * 60 * 60; if (A == (C+B)) { Console.WriteLine(1); return; } if (A < B)//(A < C) { Console.WriteLine(-1); return; } // A > C long count = 0; BigInteger pro = C+(B*1); BigInteger hand = A * 1; while(pro > hand) { count++; pro = C + (B * count); hand = A * count; } Console.WriteLine(count); } }