#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
const double eps = 1e-9, Pi = acos(-1.0);
double toRad(double x) { return x / 180.0 * Pi; }
struct pt {
  double x, y;
};
pt new_pt(double a, double b) {
  pt res;
  res.x = a, res.y = b;
  return res;
}
pt sum(pt a, pt b) { return new_pt(a.x + b.x, a.y + b.y); }
pt rotate(pt p, double a) {
  return new_pt(p.x * (cos(a) + sin(a)), p.y * (cos(a) - sin(a)));
}
int main() {
  int n;
  cin >> n;
  vector<pt> a(n * 4 + 2);
  a[0] = a[1] = new_pt(0, 0);
  double a108 = toRad(108.0), a36 = toRad(36.0), a252 = toRad(252.0),
         a144 = toRad(144.0);
  double c = 10.0 * sqrt(2.0 * (1 - cos(a108)));
  pt v3 = new_pt(10.0 * cos(a252), 10.0 * sin(a252));
  pt v1 = sum(v3, new_pt(-10.0, 0.0));
  pt v2 = new_pt(10.0 * cos(a144), 10.0 * sin(a144));
  for (int i = 1; i <= n; i++) {
    int ind = 4 * (i - 1) + 2;
    a[ind] = new_pt(c * i, 0.0);
    a[ind + 1] = sum(a[ind], v1);
    a[ind + 2] = sum(a[ind], v2);
    a[ind + 3] = sum(a[ind], v3);
  }
  int m = 4 * n + 1;
  cout << m << endl;
  cout.precision(13);
  for (int i = 1; i <= m; i++) cout << fixed << a[i].x << ' ' << a[i].y << endl;
  cout << "1 4 2 5 3\n";
  for (int i = 1; i < n; i++) {
    int cc = 2 + (i - 1) * 4;
    cout << cc << ' ' << cc + 6 << ' ' << cc + 4 << ' ' << cc + 7 << ' '
         << cc + 5 << endl;
  }
  cout << 1 << ' ';
  for (int i = 0; i < n - 1; i++) cout << 2 + 4 * i << ' ';
  for (int i = n - 1; i >= 0; i--) {
    int cc = 2 + 4 * i;
    cout << cc << ' ' << cc + 1 << ' ' << cc + 2 << ' ' << cc + 3 << ' ';
  }
  cout << 1 << endl;
  return 0;
}
