#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592653589793;
int n;
double dx[10], dy[10];
void dfs(int x) {
  if (x > n) return;
  printf(" %d", 4 * x + 1);
  dfs(x + 1);
  printf(" %d %d %d %d", 4 * x, 4 * x - 2, 4 * x - 1, 4 * x - 3);
}
void pr() {
  dx[3] = 20.0 * cos(36.0 / 180.0 * pi);
  dx[0] = 10.0 * cos(36.0 / 180.0 * pi);
  dy[0] = 10.0 * sin(36.0 / 180.0 * pi);
  dy[2] = -10.0 * sin(72.0 / 180.0 * pi);
  dx[2] = 10.0 * cos(72.0 / 180.0 * pi);
  dx[1] = dx[2] + 10.0;
  dy[1] = dy[2];
}
int main() {
  pr();
  scanf("%d", &n);
  printf("%d\n", 4 * n + 1);
  double x0 = -4500.0, y0 = 0;
  for (int i = 0; i < n; i++) {
    printf("%.13f %.13f\n", x0, y0);
    for (int j = 0; j < 3; j++) printf("%.13f %.13f\n", x0 + dx[j], y0 + dy[j]);
    x0 += dx[3];
  }
  printf("%.13f %.13f\n", x0, y0);
  for (int i = 0; i < n; i++)
    printf("%d %d %d %d %d\n", 4 * i + 1, 4 * i + 2, 4 * i + 5, 4 * i + 3,
           4 * i + 4);
  printf("%d", 1);
  dfs(1);
  puts("");
  return 0;
}
