#include <bits/stdc++.h>
const double eps = 1e-9;
const double pi = acos(-1);
const int oo = 1000000000;
const int mod = 1000000007;
const double E = 2.7182818284590452353602874713527;
using namespace std;
int main() {
  double len1 = 10 * cos(2 * pi * 36 / 360) * 2;
  double len2 = len1 * sin(2 * pi * 18 / 360);
  double len3 = len1 / 2 * tan(2 * pi * 36 / 360);
  double len4 = 10 * cos(2 * pi * 18 / 360);
  int n;
  cin >> n;
  cout << 4 * n + 1 << endl;
  printf("%.12lf %.12lf\n", 0.0, 0.0);
  for (int i = 1; i <= n; i++) {
    printf("%.12lf %.12lf\n", len1 / 2 + len2 + (i - 1) * len1, -len4);
    printf("%.12lf %.12lf\n", len1 / 2 + (i - 1) * len1, len3);
    printf("%.12lf %.12lf\n", len1 / 2 - len2 + (i - 1) * len1, -len4);
    printf("%.12lf %.12lf\n", i * len1, 0.0);
  }
  for (int i = 1; i <= n; i++)
    printf("%d %d %d %d %d\n", 4 * i - 3, 4 * i - 1, 4 * i + 1, 4 * i - 2,
           4 * i);
  for (int i = 1; i <= n + 1; i++) printf("%d ", 4 * i - 3);
  for (int i = n; i; i--)
    printf("%d %d %d %d ", 4 * i, 4 * i - 1, 4 * i - 2, 4 * i - 3);
  return 0;
}
