import math, strscans var (_, a, b, c) = stdin.readAll.scanTuple"$i $i $i" a *= 60 c *= 60 * 60 if a <= b: echo -1 quit() echo c.ceilDiv a.pred b