const d = 5;
      big = 13;
      dx : array[0..3]of longint = (0, 1, 0, -1);
      dy : array[0..3]of longint = (1, 0, -1, 0);

var i, cur, count, dir, n: longint;
    x, y: array[0..1000]of longint;

begin
  n := 1;
  x[1] := 0;
  y[1] := 0;

  count := 2;
  cur := 0;
  dir := 0;
  while n < 997 do begin
    inc(n);
    x[n] := x[n - 1] + dx[dir] * d;
    y[n] := y[n - 1] + dy[dir] * d;
    inc(cur);
    if cur = count then begin
      cur := 0;
      if (dir = 1) or (dir = 3) then begin
        count := count + 2;
      end;
      dir := (dir + 1) mod 4;
    end;
  end;

  writeln(n);
  for i := 1 to n do begin
    writeln(x[i], ' ', y[i]);
  end;
end.