#include <bits/stdc++.h>
using namespace std;
int main() {
  long double x = 0.466045194906253 - 3.830127018922193,
              y = 19.192786043799030 - 3.366025403784439;
  int f, n;
  cin >> n;
  cout << 4 * n + 1 << endl;
  cout << "3.830127018922193 3.366025403784439" << endl;
  for (f = 0; f < n; f++) {
    cout << fixed << setprecision(20) << -3.601321235851749 + f * x << ' '
         << 10.057331467373021 + f * y << endl;
    cout << fixed << setprecision(20) << 0.466045194906253 + f * x << ' '
         << 19.192786043799030 + f * y << endl;
    cout << fixed << setprecision(20) << 10.411264148588986 + f * x << ' '
         << 18.147501411122495 + f * y << endl;
    cout << fixed << setprecision(20) << 12.490381056766580 + f * x << ' '
         << 8.366025403784439 + f * y << endl;
  }
  cout << "1 2 3 4 5" << endl;
  for (f = 1; f < n; f++)
    cout << 4 * f - 1 << ' ' << 2 + 4 * f << ' ' << 3 + 4 * f << ' '
         << 4 + 4 * f << ' ' << 5 + 4 * f << endl;
  for (f = 0; f < n; f++) cout << (int)abs((double)4 * f - 1) << ' ';
  int f1;
  for (f = n - 1; f > 0; f--) {
    f1 = abs((double)4 * f - 1);
    cout << f1 + 4 << ' ' << f1 + 6 << ' ' << f1 + 3 << ' ' << f1 + 5 << ' ';
  }
  cout << "3 5 2 4 1";
  return 0;
}
