#include <bits/stdc++.h>
using namespace std;
const int max_n = 110;
int n;
double xc[4 * max_n + 2], yc[4 * max_n + 2];
int main() {
  scanf("%d", &n);
  double pi = 4 * atan(1);
  double h1 = ((double)(5)), h2 = ((double)(10)) * sin(pi / ((double)(10)));
  double v1 = ((double)(10)) * sin(((double)(4)) * pi / ((double)(10))),
         v2 = ((double)(10)) * sin(((double)(2)) * pi / ((double)(10)));
  double disp = ((double)(20)) * sin(((double)(3)) * pi / ((double)(10)));
  xc[1] = ((double)(0)) - h1 - h2;
  yc[1] = v1;
  xc[2] = h1;
  yc[2] = ((double)(0));
  xc[3] = ((double)(0));
  yc[3] = v1 + v2;
  xc[4] = ((double)(0)) - h1;
  yc[4] = ((double)(0));
  for (int i = 5; i <= 4 * n + 1; ++i) {
    xc[i] = xc[i - 4] + disp;
    yc[i] = yc[i - 4];
  }
  printf("%d\n", 4 * n + 1);
  for (int i = 1; i <= 4 * n + 1; ++i) {
    printf("%.15f %.15f\n", xc[i], yc[i]);
  }
  for (int i = 1; i <= n; ++i) {
    int ref = 4 * (i - 1);
    printf("%d %d %d %d %d\n", ref + 3, ref + 1, ref + 4, ref + 2, ref + 5);
  }
  for (int i = 1; i <= 4 * n + 1; ++i) printf("%d ", i);
  for (int i = 4 * n - 3; i >= 1; i -= 4) printf("%d ", i);
  printf("\n");
  return 0;
}
