Program HOC24;
var f: text;
a,b: longint;
t1,t2: int64;
c,i: word;
const fi='SOSANH.INP'
fo='SOSANH.OUT'
procedure ip;
begin
assgin(f,fi);
reset(f);
read(f,a,b,c);
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
t1:=1; t2:=2;
for i:=1 to c do
begin
t1:=t1*b;
t2:=t2*c;
end;
if t1>t2 then write(f,1);
if t1<t2 then write(f,-1);
if t1=t2 then write(f,0);
close(f);
end;
begin
ip;
out;
end.