#include <bits/stdc++.h>
using namespace std;
inline int cmp(double x, double y = 0) {
  return (x <= y + 1e-14) ? (x + 1e-14 < y) ? -1 : 0 : 1;
}
const long double PI = acos(-1);
const int STAR_N = 5;
pair<long double, long double> dir[STAR_N];
inline long double toRadians(double angle) { return (angle * PI) / 180.0L; }
pair<long double, long double> add(pair<long double, long double> a,
                                   pair<long double, long double> b) {
  return pair<long double, long double>(a.first + b.first, a.second + b.second);
}
int main() {
  long double angle = toRadians(108.0L);
  long double lineLen = sqrt(200.0L - 200.0L * cos(angle));
  dir[0] = pair<long double, long double>(0, 0);
  dir[4] = pair<long double, long double>(lineLen, 0);
  dir[2] = pair<long double, long double>(lineLen / 2.0L,
                                          (lineLen / 2.0L) / tan(angle / 2.0L));
  dir[1] = pair<long double, long double>(sin(toRadians(18.0L)) * 10.0L,
                                          -cos(toRadians(18.0L)) * 10.0L);
  dir[3] = pair<long double, long double>(dir[1].first + 10.0L, dir[1].second);
  int nStars;
  scanf("%d", &nStars);
  int nPoints = 4 * nStars + 1;
  pair<long double, long double> points[nPoints];
  points[0] = pair<long double, long double>(0, 0);
  for (int i = 0; i < (int)(nStars); ++i)
    for (int j = 0; j < (int)(STAR_N); ++j)
      points[4 * i + j] = add(points[4 * i], dir[j]);
  pair<long double, long double> toAdd(-3.601321235851749, 3.366025403784439);
  printf("%d\n", nPoints);
  for (int i = 0; i < (int)(nPoints); ++i) {
    points[i] = add(points[i], toAdd);
    printf("%.20lf %.20lf\n", (double)points[i].first,
           (double)points[i].second);
  }
  int order[] = {0, 2, 4, 3, 1};
  for (int i = 0; i < (int)(nStars); ++i)
    for (int j = 0; j < (int)(STAR_N); ++j) {
      if (j > 0) printf(" ");
      printf("%d", i * 4 + order[j] + 1);
      if (j + 1 == STAR_N) printf("\n");
    }
  printf("1");
  for (int i = 0; i < (int)(nStars); ++i) printf(" %d", i * 4 + 5);
  int strokeOrder[] = {1, 2, 3, 0};
  for (int i = (nStars - 1); i >= (int)(0); --i)
    for (int j = 0; j < (int)(4); ++j)
      printf(" %d", i * 4 + strokeOrder[j] + 1);
  printf("\n");
  return 0;
}
