program p1121;
type
ORD=record
x,y:integer;
end;
var
s,e,ma:ORD;
p:integer;
function move(s:ORD; op:integer):ORD;
begin
case op of
1:begin inc(s.x); end;
2:begin inc(s.y); end;
end;
exit(s);
end;
procedure search(s:ORD);
var
op:integer;
t:ORD;
begin
if s=e then begin
inc(p);
exit;
end;
for op:=1 to 2 do begin
t:=move(s,op);
if ((t.x in [1..e.x]) and (t.y in [1..e.y])) then
search(t);
end;
end;
begin
readln(e.x,e.y,ma.x,ma.y);
s.x:=0; s.y:=0;
p:=0;
search(s);
writeln(p);
end.