#include int main() { long long A, B, C; scanf("%lld%lld%lld", &A, &B, &C); long m = 60*A - B; long n = (3600*C + m - 1) / m; printf("%lld\n", (n >= 0) ? n : -1ll); return 0; }