#include <bits/stdc++.h>
using namespace std;
const double pi = atan2(0, -1), d72 = 2.0 * pi / 5, r = 5.0 / sin(d72 / 2);
int N;
void show(int s) {
  static double b = 0.0;
  for (int i = 0; i < 5; ++i) {
    if (s && i == 1) continue;
    complex<double> p = polar(r, d72 * i + pi / 2) + s * b * 2;
    printf("%.12f %.12f\n", real(p), imag(p));
    if (s == 0 && i == 4) b = real(p);
  }
}
int main() {
  while (cin >> N) {
    printf("%d\n", N * 4 + 1);
    for (int i = 0; i < N; ++i) show(i);
    for (int i = 0, c = 0; i < N; ++i) {
      for (int j = 0; j < 5; ++j) {
        if (j != 1 || i == 0)
          printf("%d", ++c);
        else
          printf("%d", c - 1);
        printf("%c", j == 4 ? '\n' : ' ');
      }
    }
    for (int i = 0; i < N; ++i) printf("%d ", i * 4 + 5);
    for (int i = N - 1; i >= 1; --i)
      printf("%d %d %d %d ", i * 4 + 3, i * 4 + 2, i * 4 + 4, i * 4 + 1);
    printf("2 4 1 3 5\n");
  }
}
