a,b,c=map(int,input().split()) if a*60<=b: print(-1) else: print(c*3600//(a*60-b)+1 if c*3600%(a*60-b)!=0 else c*3600//(a*60-b))