A,B,C = map(int, input().split()) print(-(-C*3600//(A*60-B)) if A*60 > B else -1)