#include <bits/stdc++.h>
using namespace std;
const long double PI = acos((long double)-1.0);
struct Point {
  long double x, y;
  Point() { x = y = 0; }
  Point(long double x, long double y) : x(x), y(y) {}
  Point operator+(Point a) { return Point(x + a.x, y + a.y); }
  Point operator-(Point a) { return Point(x - a.x, y - a.y); }
  Point rotate(long double alpha) {
    long double sina = sin(alpha);
    long double cosa = cos(alpha);
    return Point(x * cosa - y * sina, x * sina + y * cosa);
  }
  void print() { cout << x << ' ' << y << endl; }
  long double sqlen() { return x * x + y * y; }
  long double len() { return sqrt(sqlen()); }
};
int main() {
  long double size = sqrt(200 - cos(3 * PI / 5) * 2 * 10 * 10);
  Point A(0, 0);
  Point B(size, 0);
  Point C = (A - B).rotate(PI / 5) + B;
  Point D = (B - A).rotate(-PI / 5) + A;
  Point E = (B - C).rotate(PI / 5) + C;
  cout << (fixed) << setprecision(10);
  int n;
  cin >> n;
  cout << n * 4 + 1 << endl;
  A.print();
  for (int i = (1), _b = (n); i <= _b; i++) (A + Point(size * i, 0)).print();
  for (int i = (0), _b = (n - 1); i <= _b; i++)
    (E + Point(size * i, 0)).print();
  for (int i = (0), _b = (n - 1); i <= _b; i++) {
    (C + Point(size * i, 0)).print();
    (D + Point(size * i, 0)).print();
  }
  for (int i = (1), _b = (n); i <= _b; i++) {
    cout << i << ' ';
    cout << n + i + 1 << ' ';
    cout << i + 1 << ' ';
    cout << i * 2 + n + n + 1 << ' ';
    cout << i * 2 + n + n << endl;
  }
  cout << 1;
  for (int i = (2), _b = (n + 1); i <= _b; i++) cout << ' ' << i;
  for (int i = (n), _b = (1); i >= _b; i--) {
    cout << ' ' << 2 * i + n + n;
    cout << ' ' << i + n + 1;
    cout << ' ' << 2 * i + n + n + 1;
    cout << ' ' << i;
  }
  cout << endl;
  return 0;
}
