#include <bits/stdc++.h>
const long long mod = 1000000007;
using namespace std;
template <typename T>
void printV(vector<T>& v) {
  for (int i = 0; i < (int)(v.size()); i++) cout << v[i] << " ";
  cout << endl;
}
template <typename T>
void printVs(vector<vector<T> >& v) {
  for (int i = 0; i < (int)(v.size()); i++) printV(v[i]);
}
int main(int argc, const char* argv[]) {
  int n;
  cin >> n;
  vector<double> x(5), y(5);
  double l;
  x[0] = 0;
  x[1] = 10;
  x[3] = 5;
  double alpha = 3 * M_PI / 10.0;
  l = 20.0 * sin(alpha);
  x[2] = l * sin(alpha);
  x[4] = 10 - x[2];
  y[0] = 0;
  y[1] = 0;
  y[2] = l * cos(alpha);
  y[4] = y[2];
  y[3] = sqrt(l * l - 25.0);
  cout << setprecision(10);
  cout << fixed;
  cout << 5 + 4 * (n - 1) << endl;
  for (int i = 0; i < (int)(5); i++) cout << x[i] << " " << y[i] << endl;
  int v = 5;
  for (int i = 0; i < (int)(n - 1); i++) {
    for (int j = 0; j < (int)(4); j++) {
      cout << x[j] + l * (i + 1) << " " << y[j] << endl;
      v++;
    }
  }
  int s = 1 + (v - 5) / 4;
  vector<vector<int> > ptg(s);
  for (int i = 0; i < (int)(s); i++) ptg[i].resize(5);
  for (int i = 0; i < (int)(5); i++) ptg[0][i] = i + 1;
  for (int i = 0; i < (int)(5); i++) cout << i + 1 << " ";
  cout << endl;
  for (int i = 0; i < (int)(s - 1); i++) {
    for (int j = (1); j < (int)(5); j++) {
      ptg[i + 1][j - 1] = j + 5 + 4 * i;
      cout << ptg[i + 1][j - 1] << " ";
    }
    ptg[i + 1][4] = (i == 0 ? 3 : 8 + 4 * (i - 1));
    cout << ptg[i + 1][4] << endl;
  }
  for (int i = 0; i < (int)(s); i++) cout << ptg[i][4] << " ";
  for (int i = s - 1; i >= 0; i--)
    cout << ptg[i][2] << " " << ptg[i][0] << " " << ptg[i][3] << " "
         << ptg[i][1] << " ";
  cout << ptg[0][4];
}
