#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y;
  Point(double a = 0, double b = 0) {
    x = a;
    y = b;
  }
};
int main() {
  int N;
  cin >> N;
  Point A;
  vector<Point> V;
  vector<vector<int> > AI(N);
  V.push_back(A);
  for (int i = 0; i < N; ++i) {
    A.x += 20 * cos(72 * M_PI / 180.0) + 10;
    V.push_back(A);
    AI[i].push_back(i);
  }
  A = V.back();
  for (int i = 0; i < N; ++i) {
    A.x -= 10 * cos(72 * M_PI / 180.0) + 10;
    A.y -= 10 * cos(18 * M_PI / 180.0);
    V.push_back(A);
    A.x += 5;
    A.y += 10 * cos(18 * M_PI / 180.0) + 10 * cos(54 * M_PI / 180.0);
    V.push_back(A);
    A.x += 5;
    A.y -= 10 * cos(18 * M_PI / 180.0) + 10 * cos(54 * M_PI / 180.0);
    V.push_back(A);
    A.x -= 10 * cos(72 * M_PI / 180.0) + 10;
    A.y += 10 * cos(18 * M_PI / 180.0);
  }
  cout << V.size() << endl;
  for (int i = 0; i < V.size(); ++i) {
    printf("%0.10lf %0.10lf\n", V[i].x, V[i].y);
  }
  for (int i = 0; i < N; ++i) {
    cout << i + 1 << " " << V.size() - 1 - 3 * (i + 1) + 3 << " " << i + 2
         << " " << V.size() - 1 - 3 * (i + 1) + 4 << " "
         << V.size() - 1 - 3 * (i + 1) + 2 << " " << endl;
  }
  for (int i = 0; i <= N; ++i) cout << i + 1 << " ";
  for (int i = 0; i < N; ++i) {
    cout << N + 2 + 3 * i << " ";
    cout << N + 3 + 3 * i << " ";
    cout << N + 4 + 3 * i << " ";
    cout << N - i << " ";
  }
}
