a, b, c = io.read("*n", "*n", "*n") t = {} if c <= b then if c % a == 0 then table.insert(t, math.floor(c / a)) end end if (c + b) % a == 0 then table.insert(t, math.floor((c + b) / a)) end if #t == 0 then print(-1) else print(table.concat(t, "\n")) end