#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  double x = 0, y = 0, pi = acos(-1);
  double r = 10 / (2 * sin(pi / 5));
  scanf("%d", &n);
  printf("%d\n", 1 + n * 4);
  printf("%.10lf %.10lf\n", x + r * cos(pi / 2 + 2 * pi / 5),
         y + r * sin(pi / 2 + 2 * pi / 5));
  for (int s = 0; s < (n); s++) {
    double a = pi / 2;
    for (int i = 0; i < (4); i++) {
      printf("%.10lf %.10lf\n", x + r * cos(a), y + r * sin(a));
      a -= 2 * pi / 5;
    }
    x += 2 * r * cos(pi / 2 - 2 * pi / 5);
  }
  for (int s = 0; s < (n); s++) {
    if (s == 0)
      printf("1");
    else
      printf("%d", 1 + s * 4 - 2);
    for (int i = 0; i < (4); i++) {
      printf(" %d", 1 + s * 4 + 1 + i);
    }
    printf("\n");
  }
  printf("1");
  for (int s = 0; s < (n); s++) printf(" %d", 1 + s * 4 + 2);
  for (int s = 0; s < (n); s++) {
    int d[] = {4, 1, 3, -2};
    for (int i = 0; i < (4); i++) {
      printf(" %d", 1 + max((n - 1 - s) * 4 + d[i], 0));
    }
  }
  printf("\n");
  return 0;
}
