#include <bits/stdc++.h>
using namespace std;
const int N = -1;
const double PI = acos(-1);
const long long INF = 1e9 + 19;
struct pt {
  double x, y;
  pt() {}
  pt(double xx, double yy) : x(xx), y(yy) {}
  pt operator+(pt A) { return pt(x + A.x, y + A.y); }
  pt operator-(pt A) { return pt(x - A.x, y - A.y); }
  double len() { return sqrt(x * x + y * y); }
  pt operator*(double k) { return pt(x * k, y * k); }
  pt operator/(double k) { return pt(x / k, y / k); }
  pt rotate(double alf) {
    return pt(x * cos(alf) - y * sin(alf), x * sin(alf) + y * cos(alf));
  }
  void print() { printf("%.17f %.17f\n", x, y); }
};
int n;
void read() {
  scanf("%d", &n);
  pt O(0, 0);
  double T = 10;
  vector<pt> res;
  res.push_back(O);
  for (int i = 0; i < n; i++) {
    double alf = PI * 2 / 5;
    double beta = (PI - alf) / 2;
    double R = (T / 2) / sin(alf / 2);
    pt v(R, 0);
    double teta = 2 * beta - PI / 2;
    assert(teta > 0);
    v = v.rotate(-teta);
    pt H = O + v;
    v = v * (-1);
    for (int j = 0; j < 4; j++) {
      v = v.rotate(alf * 2);
      O = H + v;
      res.push_back(O);
    }
  }
  printf("%d\n", (int)res.size());
  for (auto p : res) p.print();
  for (int i = 0; i < n; i++) {
    printf("%d ", i * 4 + 1 + 0);
    printf("%d ", i * 4 + 1 + 3);
    printf("%d ", i * 4 + 1 + 1);
    printf("%d ", i * 4 + 1 + 4);
    printf("%d ", i * 4 + 1 + 2);
    puts("");
  }
  for (int i = 0; i < (int)res.size(); i++) printf("%d ", i + 1);
  for (int i = res.size() - 5; i >= 0; i -= 4) printf("%d ", i + 1);
  puts("");
}
void solve() {}
void stress() {}
int main() {
  if (1) {
    read();
    solve();
  } else {
    stress();
  }
  return 0;
}
