program lab2_v1;
var
a,b,F:integer;
begin
writeln('Введите A: ');readln(a);
writeln('Введите B: ');readln(b);
if (b<0) then F:=-1
else if odd(a)=true then if odd(b)=true then F:=2*a
else F:=-3
else if odd(b)=true then F:=-2
else F:=3*b;
writeln('Ответ: ',F);
readln;
end.