a,b,c=map(int,input().split()) print(-(-c*3600//(a*60-b)) if a*60>b else -1)