#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
const int INF = 1e9;
const int N = 1e4 + 1;
const int LOG = 30;
struct Pt {
  long double x, y;
};
long double ptDist(Pt a, Pt b) { return hypot(a.x - b.x, a.y - b.y); }
Pt rot(Pt a, long double alpha) {
  return {a.x * cos(alpha) - a.y * sin(alpha),
          a.x * sin(alpha) + a.y * cos(alpha)};
}
void solve() {
  int cntStars;
  cin >> cntStars;
  vector<Pt> star = {{0, sqrt(50 / (1 - cos(2 * PI / 5)))}};
  for (int i = 0; i < 4; i++) {
    star.push_back(rot(star.back(), 2 * PI / 5));
  }
  swap(star[0], star[1]);
  long double step = ptDist(star[0], star[4]);
  cout << 4 * cntStars + 1 << endl;
  for (int i = 0; i < 5; i++)
    cout << fixed << setprecision(12) << star[i].x << " " << star[i].y << "\n";
  for (int starNum = 1; starNum < cntStars; starNum++) {
    for (int i = 1; i < 5; i++) {
      cout << fixed << setprecision(12) << star[i].x + step * starNum << " "
           << star[i].y << "\n";
    }
  }
  for (int i = 0; i < cntStars; i++) {
    vector<int> nums = {0, 2, 3, 4, 1};
    for (auto x : nums) cout << 4 * i + x + 1 << " ";
    cout << "\n";
  }
  vector<int> seq = {0};
  for (int i = 0; i < cntStars; i++) {
    seq.push_back(3 + i * 4);
    seq.push_back(1 + i * 4);
    seq.push_back(2 + i * 4);
    seq.push_back(4 + i * 4);
  }
  for (int i = cntStars * 4 - 4; i >= 0; i -= 4) seq.push_back(i);
  assert(seq.size() == 5 * cntStars + 1);
  for (auto x : seq) cout << x + 1 << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
}
