import java.util.Scanner; public class Main { @SuppressWarnings("resource") public static void main(String args[]) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); if (a * 60 <= b ) { System.out.println(-1); return; } int t = a * 60; int p = b + c * 60 * 60; int ans = 1; while (t <= p) { t = a * 60 * ans; p = b * ans + c * 60 * 60; ans++; } System.out.println(ans-1); } }