#include <bits/stdc++.h>
using namespace std;
struct crd {
  double x, y;
};
int main() {
  int N;
  cin >> N;
  vector<crd> l(3), s(N * 4 + 1);
  double len = 16.18033988749895;
  l[0].x = 9.51056516295154;
  l[0].y = 3.0901699437495;
  l[1].x = -5.8778525229247;
  l[1].y = 8.0901699437495;
  l[2].x = 9.51056516295154;
  l[2].y = 13.0901699437495;
  for (int i = 0; i <= N; i++) {
    s[i].y = len * (double)i;
    s[i].x = 0;
  }
  for (int i = 1; i <= N; i++) {
    int t = N - i, ind = 3 * i + N - 2;
    for (int j = 0; j < l.size(); j++) {
      s[ind + j].x = l[j].x;
      s[ind + j].y = l[j].y + t * len;
    }
  }
  cout << s.size() << endl;
  for (int i = 0; i < s.size(); i++) printf("%.13lf %.13lf\n", s[i].x, s[i].y);
  for (int i = 1; i <= N; i++)
    cout << N - i + 1 << " " << 3 * i + N << " " << N - i + 2 << " "
         << 3 * i + N + 1 << " " << 3 * i + N - 1 << endl;
  for (int i = 0; i <= N; i++) cout << i + 1 << " ";
  for (int i = N; i > 0; i--)
    cout << 4 * N - 3 * i + 2 << " " << 4 * N - 3 * i + 3 << " "
         << 4 * N - 3 * i + 4 << " " << i << " ";
  cout << endl;
  return 0;
}
