#include <bits/stdc++.h>
double x[600], y[600];
double dx, dy;
int n;
int main() {
  scanf("%d", &n);
  double pi = acos(-1);
  x[3] = y[3] = 0.0;
  dx = cos(0.2 * pi) * 10;
  dy = sin(0.2 * pi) * 10;
  x[1] = x[3] - dx;
  y[1] = y[3] - dy;
  x[5] = x[3] + dx;
  y[5] = y[3] - dy;
  dy = 5 / tan(0.1 * pi);
  x[4] = x[3] - 5;
  y[4] = y[3] - dy;
  x[2] = x[3] + 5;
  y[2] = y[3] - dy;
  dx = 2 * 10 * cos(0.2 * pi);
  for (int i = 6; i <= 4 * n + 1; ++i) {
    x[i] = x[i - 4] + dx;
    y[i] = y[i - 4];
  }
  printf("%d\n", 4 * n + 1);
  for (int i = 1; i <= 4 * n + 1; ++i) printf("%.15lf %.15lf\n", x[i], y[i]);
  for (int i = 1; i <= n; ++i) {
    int index = 4 * i - 3;
    printf("%d %d %d %d %d\n", index, index + 2, index + 4, index + 1,
           index + 3);
  }
  for (int i = 1; i <= 4 * n + 1; ++i) printf("%d ", i);
  for (int i = n - 1; i; --i) printf("%d ", 4 * i + 1);
  printf("1\n");
}
