#include <bits/stdc++.h>
using namespace std;
template <typename T, typename TT>
ostream &operator<<(ostream &s, pair<T, TT> t) {
  return s << "(" << t.first << "," << t.second << ")";
}
template <typename T>
ostream &operator<<(ostream &s, vector<T> t) {
  s << "{";
  for (int i = 0; i < t.size(); i++)
    s << t[i] << (i == t.size() - 1 ? "" : ",");
  return s << "}" << endl;
}
const double eps = 1e-9;
inline bool iszero(double x) { return x <= eps && x >= -eps; }
struct pt {
  double x;
  double y;
  pt() { x = y = 0.0; }
  pt(double _x, double _y) : x(_x), y(_y) {}
  bool operator==(pt &a) { return iszero(a.x - x) && iszero(a.y - y); }
};
ostream &operator<<(ostream &s, pt pt1) {
  return s << "(" << pt1.x << "," << pt1.y << ")";
}
istream &operator>>(istream &s, pt &pt1) {
  double x, y;
  s >> x >> y;
  pt1 = pt(x, y);
  return s;
}
bool operator<(const pt &a, const pt &b) {
  if (a.x < b.x) return 1;
  if (a.x > b.x) return 0;
  return a.y < b.y;
}
pt operator+(const pt &a, const pt &b) { return pt(a.x + b.x, a.y + b.y); }
pt operator-(const pt &a, const pt &b) { return pt(a.x - b.x, a.y - b.y); }
pt operator*(const pt &a, const pt &b) {
  return pt(a.x * b.x - a.y * b.y, b.x * a.y + b.y * a.x);
}
pt cnj(pt a) { return pt(a.x, -a.y); }
pt operator*(double r, const pt &a) { return pt(a.x * r, a.y * r); }
pt operator*(const pt &a, double r) { return pt(a.x * r, a.y * r); }
pt operator/(const pt &a, double r) { return pt(a.x / r, a.y / r); }
double sqabs(const pt &a) { return a.x * a.x + a.y * a.y; }
double abs(const pt &a) { return sqrt(a.x * a.x + a.y * a.y); }
double dist(const pt &a, const pt &b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
double sqdist(const pt &a, const pt &b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
pt operator/(const pt &a, const pt &b) { return (a * cnj(b)) / sqabs(b); }
double arg(const pt &a) { return atan2(a.y, a.x); }
double skal(const pt &a, const pt &b) { return a.x * b.x + a.y * b.y; }
double vec(const pt &a, const pt &b) { return a.x * b.y - a.y * b.x; }
double det(const pt &a, const pt &b, const pt &c) { return vec(b - a, c - a); }
double dist(const pt &a, const pt &b, const pt &c) {
  return abs(det(b, c, a)) / dist(b, c);
}
double dlrzut(const pt &a, const pt &b) { return skal(a, b) / abs(b); }
pt rzut(const pt &a, const pt &b, const pt &c) {
  pt d = c - b;
  return b + d * skal(a - b, d) / sqabs(d);
}
int a[1000000], b[1000000];
bool uz[1000000];
int roz[1000000];
vector<int> kr[1000000];
bool odw[1000000];
int akt;
int N;
vector<pair<int, int> > tour;
void dod_kr(int x, int y) {
  a[akt] = x;
  b[akt] = y;
  uz[akt] = 0;
  kr[x].push_back(akt);
  kr[y].push_back(akt);
  akt++;
}
void czysc(int _N) {
  N = _N;
  for (int i = 0; i < N; i++) kr[i].clear();
  for (int i = 0; i < N; i++) roz[i] = 0;
  akt = 0;
}
void dfs(int u, int par) {
  while (roz[u] < kr[u].size()) {
    int r = roz[u];
    roz[u]++;
    if (!uz[kr[u][r]]) {
      uz[kr[u][r]] = 1;
      if (a[kr[u][r]] == u)
        dfs(b[kr[u][r]], u);
      else
        dfs(a[kr[u][r]], u);
    }
  }
  if (par != -1) tour.push_back(make_pair(par, u));
}
void spojny(int u) {
  odw[u] = 1;
  for (int i = 0; i < kr[u].size(); i++) {
    int z = (a[kr[u][i]] == u ? b[kr[u][i]] : a[kr[u][i]]);
    if (!odw[z]) spojny(z);
  }
}
vector<pair<int, int> > get_tour(int u) {
  tour.clear();
  for (int i = 0; i < N; i++)
    if (kr[i].size() % 2) return tour;
  for (int i = 0; i < N; i++) odw[i] = 0;
  spojny(u);
  for (int i = 0; i < N; i++)
    if (kr[i].size() && !odw[i]) return tour;
  dfs(u, -1);
  reverse((tour).begin(), (tour).end());
  return tour;
}
vector<pt> w;
vector<vector<int> > wbki;
int main() {
  ios_base::sync_with_stdio(0);
  double r = 10.0 / (2 * sin(M_PI / 5));
  pt pg = pt(r, 0) * pt(cos(M_PI / 4), sin(M_PI / 4));
  pt last(0, 0);
  int lastnr = 0;
  int n;
  cin >> n;
  czysc(5 * n - n + 1);
  for (int i = 0; i < n; i++) {
    pt ce = last + pg;
    pt rad = last - ce;
    for (int j = 0; j < 5; j++) {
      pt z = ce + rad * pt(cos(j * 2 * M_PI / 5), sin(j * 2 * M_PI / 5));
      if (i == 0 || j) w.push_back(z);
    }
    vector<int> pol;
    for (int j = 0; j < 4; j++) pol.push_back((int)w.size() - 1 - j);
    pol.push_back(lastnr);
    wbki.push_back(pol);
    lastnr = w.size() - 3;
    last = w[lastnr];
    for (int j = 0; j < 5; j++)
      for (int k = j + 1; k <= 4; k++) {
        if (k != j + 1 && (j != 0 || k != 4)) dod_kr(pol[j], pol[k]);
      }
  }
  vector<pair<int, int> > tr = get_tour(0);
  cout << w.size() << "\n";
  for (int i = 0; i < w.size(); i++)
    cout << setprecision(12) << fixed << w[i].x << " " << w[i].y << "\n";
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 5; j++) cout << wbki[i][j] + 1 << " ";
    cout << "\n";
  }
  for (int i = 0; i < tr.size(); i++) {
    if (!i) cout << tr[i].first + 1 << " ";
    cout << tr[i].second + 1 << " ";
  }
  return 0;
}
