#include <bits/stdc++.h>
using namespace std;
const double PI = 4 * atan(1);
const double THETA = 2 * PI / 5;
const double R =
    10 / sqrt((1 - cos(THETA)) * (1 - cos(THETA)) + sin(THETA) * sin(THETA));
const double OFFSET = 2 * R * sin(2 * PI / 5);
int main() {
  int n;
  scanf("%d", &n);
  printf("%d\n", 4 * n + 1);
  printf("%5.20f %5.20f\n", R * cos(-THETA), R * sin(-THETA));
  for (int i = 0; i < n; i++) {
    for (int j = 1; j <= 4; j++) {
      printf("%5.20f %5.20f\n", R * cos(-THETA + 3 * j * THETA),
             R * sin(-THETA + 3 * j * THETA) + i * OFFSET);
    }
  }
  for (int i = 0; i < n; i++) {
    printf("%d %d %d %d %d\n", 4 * i + 1, 4 * i + 3, 4 * i + 5, 4 * i + 2,
           4 * i + 4);
  }
  for (int i = 0; i < 4 * n + 1; i++) {
    printf("%d ", i + 1);
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", 4 * n - 3 - 4 * i);
  }
  printf("\n");
}
