#include <bits/stdc++.h>
using namespace std;
const double PI = 3.1415926535897932384626433832795;
int n;
double x[5];
double y[5];
int main() {
  cin >> n;
  cout << 4 * n + 1 << endl;
  double beta = 3 * PI / 5.0;
  double delta = sqrt(200.0 * (1 - cos(beta)));
  double alfa = 2 * PI / 5.0;
  x[0] = 0;
  y[0] = sqrt(50.0 / (1 - cos(alfa)));
  for (int i = 1; i < 5; ++i) {
    x[i] = x[i - 1] * cos(alfa) - y[i - 1] * sin(alfa);
    y[i] = x[i - 1] * sin(alfa) + y[i - 1] * cos(alfa);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < 5; ++j)
      if (j != 1 || i == 0) printf("%.9lf %.9lf\n", x[j] + i * delta, y[j]);
  }
  printf("1 2 3 4 5\n");
  for (int i = 1; i < n; ++i) {
    int tmp = i * 4 + 2;
    printf("%d %d %d %d %d\n", tmp, tmp - 1, tmp + 1, tmp + 2, tmp + 3);
  }
  printf("2 ");
  for (int i = 1; i <= n; ++i) printf("%d ", i * 4 + 1);
  for (int i = n - 1; i >= 1; --i) {
    printf("%d %d %d %d ", 4 * i + 3, 4 * i + 2, 4 * i + 4, 5 + 4 * (i - 1));
  }
  printf("3 1 4 2\n");
  return 0;
}
