uses crt;
var a,b,c,d,i,min:integer;
x:array[1..4]of integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
write('Nhap c='); readln(c);
write('Nhap d='); readln(d);
x[1]:=a;
x[2]:=b;
x[3]:=c;
x[4]:=d;
min:=x[1];
for i:=1 to 4 do
if min>x[i] then min:=x[i];
writeln(min);
readln;
end.