#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
const double pi = 2 * acos(0.0);
const int MOD = 1000000007;
vector<pair<double, double> > ans;
double ang = pi / 5.0;
double f[] = {ang * 2, ang * 8, 4 * ang, 0 * ang, 6 * ang};
vector<int> g[111];
vector<int> res;
int main() {
  int n;
  cin >> n;
  ans.clear();
  res.clear();
  double len = sqrt(10 * 10 * 2. - 2.0 * 10 * 10 * cos(ang * 3.0));
  double x, y;
  x = y = 0;
  for (int i = 1; i <= n - 1; ++i) {
    ans.push_back(make_pair(x, y));
    res.push_back((int)ans.size());
    g[i].push_back((int)ans.size());
    x += len * cos(f[0]);
    y += len * sin(f[0]);
    g[i].push_back((int)ans.size() + 1);
  }
  ans.push_back(make_pair(x, y));
  g[n].push_back((int)ans.size());
  res.push_back((int)ans.size());
  for (int i = n; i >= 1; --i) {
    int st;
    if (i == n)
      st = 0;
    else
      st = 1;
    for (; st < 5; st++) {
      x += len * cos(f[st]);
      y += len * sin(f[st]);
      if (st == 4) {
        res.push_back(i);
      } else {
        ans.push_back(make_pair(x, y));
        res.push_back((int)ans.size());
        g[i].push_back((int)ans.size());
      }
    }
  }
  cout << (int)ans.size() << endl;
  for (int i = 0; i <= (int)ans.size() - 1; ++i)
    printf("%.9f %.9f\n", ans[i].first, ans[i].second);
  for (int i = 1; i <= n; ++i)
    cout << g[i][0] << " " << g[i][3] << " " << g[i][1] << " " << g[i][4] << " "
         << g[i][2] << endl;
  for (int i = 0; i <= (int)res.size() - 1; ++i) cout << res[i] << " ";
  cout << endl;
}
