#include typedef long long ll; ll myceil(ll a, ll b){ if(a%b==0) return a/b; else return a/b+1; } int main(){ ll A,B,C; scanf("%lld %lld %lld",&A,&B,&C); if(60*A == B){ puts("0"); }else if(60*A < B){ printf("-1"); }else{ printf("%lld\n",myceil(60*60*C,60*A-B)); } }