#include <bits/stdc++.h>
using namespace std;
struct P {
  double x, y;
  P() {}
  P(double x, double y) : x(x), y(y) {}
} p[105 * 4 + 3];
int n, m;
int main() {
  double delta;
  scanf("%d", &n);
  p[2] = P(0, 10.0 * sin(72.0 / 180 * acos(-1.0)));
  p[1] = P(10.0 * sin(54.0 / 180 * acos(-1.0)),
           p[2].y + 10 * cos(54.0 / 180 * acos(-1.0)));
  p[3] = P(10 * cos(72.0 / 180 * acos(-1.0)), 0);
  p[4] = P(p[3].x + 10, 0);
  delta = 2 * 10 * sin(54.0 / 180 * acos(-1.0));
  for (int i = 5; i <= n * 4 + 2; i++) {
    p[i] = p[i - 4];
    p[i].x += delta;
  }
  printf("%d\n", n * 4 + 1);
  for (int i = 1; i <= n * 4 + 2; i++) {
    if (i == 4 * n + 1) continue;
    printf("%.9lf %.9lf\n", p[i].x, p[i].y);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= 4; j++) cout << (i - 1) * 4 + j << " ";
    if (i == n)
      cout << i * 4 + 1 << endl;
    else
      cout << i * 4 + 2 << endl;
  }
  for (int i = n; i >= 1; i--) {
    if (i == n)
      cout << 4 * i + 1 << " ";
    else
      cout << 4 * i + 2 << " ";
  }
  for (int i = 1; i <= n; i++) {
    int j = (i - 1) * 4;
    cout << j + 2 << " " << j + 4 << " " << j + 1 << " " << j + 3 << " ";
  }
  cout << 4 * n + 1 << endl;
}
