// yukicoder: No.734 Careful Engineer // 2019.5.4 bal4u #include int main() { int A, B, C; scanf("%d%d%d", &A, &B, &C); if (60*(long long)A <= B) puts("-1"); else printf("%lld\n", 1+3600*(long long)C/(60*(long long)A - B)); return 0; }