#include <bits/stdc++.h>
using namespace std;
double R = sqrt(10) * sqrt(5 + sqrt(5));
double pi = acos(-1);
double ax[555], ay[555];
int n, k;
void dr(int l, double x, double y) {
  if (l == n) return;
  double yc = y - 5;
  double xc = x + sqrt(R * R - 5 * 5);
  double xx, yy;
  if (!k) ax[k] = x, ay[k++] = y;
  xx = xc + cos((pi + pi) / 5) * R;
  yy = yc + sin((pi + pi) / 5) * R;
  ax[k] = xx;
  ay[k++] = yy;
  xx = xc + cos((pi + pi) / 5 * 3) * R;
  yy = yc + sin((pi + pi) / 5 * 3) * R;
  ax[k] = xx;
  ay[k++] = yy;
  xx = xc + cos((pi + pi) / 5 * 4) * R;
  yy = yc + sin((pi + pi) / 5 * 4) * R;
  ax[k] = xx;
  ay[k++] = yy;
  xx = xc + R;
  yy = yc;
  ax[k] = xx;
  ay[k++] = yy;
  dr(l + 1, xx, yy);
}
void dd(int l) {
  if (l == n) return;
  int t = l * 4 + 1;
  cout << " " << t + 4;
  dd(l + 1);
  cout << " " << t + 2 << " " << t + 1 << " " << t + 3 << " " << t;
}
int main() {
  cin >> n;
  dr(0, 0, 0);
  cout << (k) << endl;
  for (int i = 0; i < k; i++) printf("%.10lf %.10lf\n", ax[i], ay[i]);
  for (int i = 0; i < n; i++) {
    int t = i * 4 + 1;
    cout << t << " " << t + 2 << " " << t + 3 << " " << t + 4 << " " << t + 1
         << endl;
  }
  cout << 1;
  dd(0);
  puts("");
  return 0;
}
