k,a,b,c,n: integer;
Function max(a,b,c: integer): integer;
Begin
If ((a>b) and (a>c)) then max:=a else
If b>c then max:=b else max:=c;
end;
begin
REad(a,b,c);
For k:=1 to max(a,b,c) div 2 do
If ((a mod k=0) and (b mod k=0) and (c mod k=0)) then n:=k;
Writeln(n);
Readln;
end.
k,a,b,c,n: integer;
Function max(a,b,c: integer): integer;
Begin
If ((a>b) and (a>c)) then max:=a else
If b>c then max:=b else max:=c;
end;
begin
REad(a,b,c);
For k:=1 to max(a,b,c) div 2 do
If ((a mod k=0) and (b mod k=0) and (c mod k=0)) then n:=k;
Writeln(n);
Readln;
Readln;
end.