using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var asec = c[0] * 60L; var bsec = (long)c[1]; var csec = c[2] * 3600L; if (asec <= bsec) WriteLine(-1); else { // ax >= bx + c // x >= c / (a - b) WriteLine((csec + asec - bsec - 1) / (asec - bsec)); } } }