program Problem_B____Cake;

const max = 3000;

type
   tvector = record x,y : comp; end;
   trational = record c,m : comp; end;
   trational_point = record x,y : trational; end;

var lines : array[1..max,1..2] of tvector;
    n,i : integer;
    f : text;
    parts : comp;
    intersect : array[1..max] of trational_point;

procedure read_line(ix : integer);
var b1,b2 : tvector;
begin
   read(f,b1.x,b1.y,b2.x,b2.y);
   lines[ix,1].x:=b1.x;
   lines[ix,1].y:=b1.y;
   lines[ix,2].x:=b2.x-b1.x;
   lines[ix,2].y:=b2.y-b1.y;
end;

function count_intersections(p1,p2 : integer; var pr : trational_point) : boolean;
var k1,k2 : comp;
begin
   {are the lines parallel ?}
   if lines[p1,2].x*lines[p2,2].y=lines[p1,2].y*lines[p2,2].x then begin
      count_intersections:=false; exit;
   end;
   {count the coordinates of their intersection}
   k1:=lines[p2,2].y*(lines[p2,1].x-lines[p1,1].x)-lines[p2,2].x*(lines[p2,1].y-lines[p1,1].y);
   k2:=lines[p1,2].x*lines[p2,2].y-lines[p1,2].y*lines[p2,2].x;
   pr.x.c:=k2*lines[p1,1].x+k1*lines[p1,2].x;
   pr.x.m:=k2;
   pr.y.c:=k2*lines[p1,1].y+k1*lines[p1,2].y;
   pr.y.m:=k2;
   if k2<0 then begin
      pr.x.c:=-pr.x.c;
      pr.x.m:=-pr.x.m;
      pr.y.c:=-pr.y.c;
      pr.y.m:=-pr.y.m;
   end;
   count_intersections:=true;
end;

function less(b1,b2 : trational_point) : boolean;
begin
   {compare two rational numbers}
   less:=false;
   if b1.x.c*b2.x.m<b1.x.m*b2.x.c then begin less:=true; exit; end;
   if (b1.x.c*b2.x.m=b1.x.m*b2.x.c)
      and (b1.y.c*b2.y.m<b1.y.m*b2.y.c)
         then begin less:=true; exit; end;
end;

procedure sort(l,r:integer);
var
  i, j: integer;
  x, y : trational_point;
begin
  i:=l; j:=r; x:=intersect[(l+r) DIV 2];
  repeat
    while less(intersect[i],x) do inc(i);
    while less(x,intersect[j]) do dec(j);
    if i<=j then begin
      y:=intersect[i]; intersect[i]:=intersect[j]; intersect[j]:=y; inc(i); dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;

procedure process_line(ix : integer);
var i,j,prc,diff,ii : integer;
    ppr : trational_point;

begin
   prc:=0;
   for i:=1 to ix-1 do if count_intersections(i,ix,ppr) then begin
      {if an intersection was found, add it}
      inc(prc); intersect[prc]:=ppr;
   end;
   if prc>0 then sort(1,prc);
   {count different intersections}
   diff:=prc;
   for i:=2 to prc do if (intersect[i].x.c*intersect[i-1].x.m=intersect[i].x.m*intersect[i-1].x.c) and
         (intersect[i].y.c*intersect[i-1].y.m=intersect[i].y.m*intersect[i-1].y.c) then dec(diff);
   parts:=parts+diff+1;
end;

begin
   if paramcount=0 then halt;
   assign(f,paramstr(1));
   reset(f);
   read(f,n);
   for i:=1 to n do read_line(i);
   close(f);
   parts:=1;
   for i:=1 to n do process_line(i);
   writeln(parts);
end.