program Guess;
var a, b, S, X : integer;

begin
assign(input, 'guess.in');  reset(input);
assign(output,'guess.out'); rewrite(output);

read(a,b,S);
close(input);

if S mod (a*b) <> 0 then X:= -1;
if S mod (a*b) = 0  then begin
   X:= S div (a*b) - a - 1;
   if X <= 0 then X:= -1;
   end;

write(X);
close(output);
end.
