Решение
{$A+,B-,D+,E+,F-,G-,I+,L+,N-,O-,P-,Q-,R-,S-,T-,V+,X+}
{$M 65520,0,655360}
Program Problem_A;
Var a:array[1..3] of record
x,y:real
end;
Sum:word;
h,n,i:integer;
BEGIN
Assign(input,'fine.in'); Reset(input);
Assign(output,'fine.out'); ReWrite(output);
Sum:=0;
Read(N);
for i:=1 to n do
begin
inc(h);
readln(a[h].x,a[h].y);
if h=3 then begin
if a[h-2].x*(a[h].y-a[h-1].y)+a[h-1].x*(a[h-2].y-a[h].y)+
a[h].x*(a[h-1].y-a[h-2].y)<0 then inc(sum,1);
a[1]:=a[2]; a[2]:=a[3]; dec(h)
end
end;
writeln(sum);
close(output);
END.