import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Egor Kulikov (egor@egork.net)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
        int count = in.readInt();
        double side = Math.sin(3 * Math.PI / 10) * 20;
        out.printLine(4 * count + 1);
        out.printLine(0, 0);
        for (int i = 1; i <= count; i++)
            out.printLine(side * i, 0);
        double height = Math.cos(3 * Math.PI / 10) * 10;
        for (int i = 0; i < count; i++)
            out.printLine(side * i + side / 2, height);
        double otherHeight = -Math.sin(2 * Math.PI / 5) * 10;
        double shift = Math.cos(2 * Math.PI / 5) * 10;
        for (int i = 0; i < count; i++)
            out.printLine(side * i + shift, otherHeight);
        for (int i = 0; i < count; i++)
            out.printLine(side * (i + 1) - shift, otherHeight);
        for (int i = 0; i < count; i++)
            out.printLine(i + 1, 2 * count + 2 + i, 3 * count + 2 + i, 2 + i, count + 2 + i);
        for (int i = 0; i <= count; i++)
            out.print(count - i + 1, "");
        for (int i = 0; i < count; i++)
            out.print(3 * count + 2 + i, count + 2 + i, 2 * count + 2 + i, 2 + i, "");
        out.printLine();
	}
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public static boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}

	}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        out.println((n + 1) + 3 * n);
        double[] x = new double[(n + 1) + 3 * n];
        double[] y = new double[(n + 1) + 3 * n];
        int pos = 0;
        double edgeLen = 5.0 / Math.sin(Math.PI / 10);
        for (int i = 0; i < n + 1; ++i) {
            out.printf("%.20f %.20f\n", (i * edgeLen), 0.0);
            x[pos] = i * edgeLen;
            y[pos] = 0;
            ++pos;
        }
        double dx1 = edgeLen * Math.cos(-Math.PI / 5);
        double dy1 = edgeLen * Math.sin(-Math.PI / 5);
        double dx2 = edgeLen - dx1;
        double dy2 = dy1;
        double dx3 = edgeLen / 2.0;
        double dy3 = edgeLen * Math.cos(Math.PI / 10) + dy1;
        for (int i = 0; i < n; ++i) {
            double sx = i * edgeLen;
            double sy = 0.0;
            out.printf("%.20f %.20f\n", (sx + dx1), (sy + dy1));
            x[pos] = sx + dx1;
            y[pos] = sy + dy1;
            ++pos;
            out.printf("%.20f %.20f\n", (sx + dx2), (sy + dy2));
            x[pos] = sx + dx2;
            y[pos] = sy + dy2;
            ++pos;
            out.printf("%.20f %.20f\n", (sx + dx3), (sy + dy3));
            x[pos] = sx + dx3;
            y[pos] = sy + dy3;
            ++pos;
        }
        for (int i = 0; i < n; ++i) {
            out.println((i + 1) + " " + (n + 1 + 3 * i + 3) + " " + (i + 2) + " " + (n + 1 + 3 * i + 1) + " " + (n + 1 + 3 * i + 2));
            //check(x, y, i + 1, (n + 1 + 3 * i + 3), (i + 2), (n + 1 + 3 * i + 1), (n + 1 + 3 * i + 2));
        }
        for (int i = 0; i < n; ++i) {
            if (i > 0) out.print(" ");
            out.print((i + 1) + " " + (n + 1 + 3 * i + 1) + " " + (n + 1 + 3 * i + 3) + " " + (n + 1 + 3 * i + 2));
        }
        for (int i = n; i >= 0; --i) {
            out.print(" " + (i + 1));
        }
        out.println();
	}

    }

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author AlexFetisov
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {

    static final double SIDE = Math.sin(3 * Math.PI / 10) * 20;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();

        out.println(4 * n + 1);
        out.println("0 0");
        for (int i = 1; i <= n; ++i) {
            out.println((SIDE * i) + " " + 0);
        }
        double h = Math.cos(3 * Math.PI / 10) * 10;
        for (int i = 0; i < n; ++i) {
            out.println((SIDE * i + SIDE / 2) + " " + h);
        }
        h = -Math.sin(2 * Math.PI / 5) * 10;
        double shift = Math.cos(2 * Math.PI / 5) * 10;
        for (int i = 0; i < n; ++i) {
            out.println((SIDE * i + shift) + " " + h);
        }
        for (int i = 0; i < n; ++i) {
            out.println((SIDE * (i + 1) - shift) + " " + h);
        }
        for (int i = 0; i < n; ++i) {
            out.print(i + 1);
            out.print(" ");
            out.print(2 * n + 2 + i);
            out.print(" ");
            out.print(3 * n + 2 + i);
            out.print(" ");
            out.print(2 + i);
            out.print(" ");
            out.print(1 * n + 2 + i);
            out.println();
        }
        for (int i = 0; i <= n; ++i) {
            out.print(n - i + 1);
            out.print(" ");
        }
        for (int i = 0; i < n; ++i) {
            out.print(3 * n + 2 + i);
            out.print(" ");

            out.print(1 * n + 2 + i);
            out.print(" ");

            out.print(2 * n + 2 + i);
            out.print(" ");

            out.print(2 + i);
            out.print(" ");
        }
        out.println();
    }

}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer stt;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    public String nextString() {
        while (stt == null || !stt.hasMoreTokens()) {
            stt = new StringTokenizer(nextLine());
        }
        return stt.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

}

// practice with rainboy
import java.io.*;
import java.util.*;

public class CF213D extends PrintWriter {
	CF213D() { super(System.out); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		CF213D o = new CF213D(); o.main(); o.flush();
	}

	void main() {
		int n = sc.nextInt();
		double a = Math.PI * 2 / 5;
		double ca = Math.cos(a), sa = Math.sin(a);
		double c2a = Math.cos(a * 2), s2a = Math.sin(a * 2);
		double[] xx = new double[4];
		double[] yy = new double[4];
		xx[0] = -ca; yy[0] = sa;
		xx[1] = 1 + ca + c2a; yy[1] = sa + s2a;
		xx[2] = 1 + ca; yy[2] = sa;
		xx[3] = 1; yy[3] = 0;
		println(1 + n * 4);
		double x = 0, y = 0;
		printf("%.9f %.9f\n", x, y);
		for (int i = 0; i < n; i++)
			for (int h = 0; h < 4; h++) {
				x = (xx[h] + i) * 10;
				y = yy[h] * (i % 2 == 0 ? 10 : -10);
				printf("%.9f %.9f\n", x, y);
			}
		for (int i = 0; i < n; i++)
			println((i * 4 + 1) + " " + (i * 4 + 2) + " " + (i * 4 + 3) + " " + (i * 4 + 4) + " " + (i * 4 + 5));
		print(1);
		for (int i = 0; i < n; i++)
			print(" " + (i * 4 + 3) + " " + (i * 4 + 5));
		for (int i = n - 1; i >= 0; i--)
			print(" " + (i * 4 + 2) + " " + (i * 4 + 4) + " " + (i * 4 + 1));
		println();
	}
}

import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class Main extends PrintWriter {
    BufferedReader in;
    StringTokenizer stok;
    final Random rand = new Random(31);
    final int inf = (int) 1e9;
    final long linf = (long) 1e18;

    final static String IO = "_std";

    int pid = 0;

    class Point {
        double x, y;
        int id;

        public Point(double x, double y) {
            this.x = x;
            this.y = y;
            id = ++pid;
            points.add(this);
        }
    }

    Point[] def = new Point[5];

    List<Point> points = new ArrayList<>();
    int[][] pids;

    List<Integer> moves = new ArrayList<>();

    void gen(int n, Point f) {
        pids[n][0] = f.id;
        Point s = new Point(f.x + def[3].x - def[0].x, f.y + def[3].y - def[0].y);
        pids[n][1] = s.id;
        moves.add(s.id);
        if (n > 1) {
            gen(n - 1, s);
        }
        s = new Point(s.x + def[1].x - def[3].x, s.y + def[1].y - def[3].y);
        pids[n][2] = s.id;
        moves.add(s.id);
        s = new Point(s.x + def[4].x - def[1].x, s.y + def[4].y - def[1].y);
        pids[n][3] = s.id;
        moves.add(s.id);
        s = new Point(s.x + def[2].x - def[4].x, s.y + def[2].y - def[4].y);
        pids[n][4] = s.id;
        moves.add(s.id);
        moves.add(f.id);
    }

    Point rot(Point a, Point b, double ang) {
        double x = a.x - b.x;
        double y = a.y - b.y;
        double nx = x * cos(ang) - y * sin(ang);
        double ny = x * sin(ang) + y * cos(ang);
        return new Point(nx + b.x, ny + b.y);
    }

    void solve() throws IOException {
        def[0] = new Point(0, 0);
        def[1] = new Point(10, 0);
        double ang = -PI * 108 / 180;
        def[2] = rot(def[0], def[1], ang);
        def[3] = rot(def[1], def[2], ang);
        def[4] = rot(def[2], def[3], ang);

        points.clear();
        pid = 0;

        int n = nextInt();

        pids = new int[n + 1][5];
        moves.add(1);
        gen(n, new Point(0, 0));
        println(points.size());
        for (Point point : points) {
            printf("%.21f %.21f%n", point.x, point.y);
        }
        for (int i = 1; i <= n; i++) {
            printf("%d %d %d %d %d%n", pids[i][0], pids[i][2], pids[i][4], pids[i][1], pids[i][3]);
        }
        for (Integer move : moves) {
            print(move);
            print(" ");
        }
    }

    Main() {
        super(System.out);
        in = new BufferedReader(new InputStreamReader(System.in));
    }

    Main(String fileIn, String fileOut) throws IOException {
        super(fileOut);
        in = new BufferedReader(new FileReader(fileIn));
    }

    public static void main(String[] args) throws IOException {
        Main main;
        if ("_std".equals(IO)) {
            main = new Main();
        } else if ("_iodef".equals(IO)) {
            main = new Main("input.txt", "output.txt");
        } else {
            main = new Main(IO + ".in", IO + ".out");
        }
        main.solve();
        main.close();
    }

    String next() throws IOException {
        while (stok == null || !stok.hasMoreTokens()) {
            String s = in.readLine();
            if (s == null) {
                return null;
            }
            stok = new StringTokenizer(s);
        }
        return stok.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    int[] nextIntArray(int len) throws IOException {
        int[] a = new int[len];
        for (int i = 0; i < len; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    int[] nextIntArraySorted(int len) throws IOException {
        int[] a = nextIntArray(len);
        shuffle(a);
        Arrays.sort(a);
        return a;
    }

    void shuffle(int[] a) {
        for (int i = 1; i < a.length; i++) {
            int x = rand.nextInt(i + 1);
            int _ = a[i];
            a[i] = a[x];
            a[x] = _;
        }
    }

    void shuffleAndSort(int[] a) {
        shuffle(a);
        Arrays.sort(a);
    }

    boolean nextPermutation(int[] p) {
        for (int a = p.length - 2; a >= 0; --a) {
            if (p[a] < p[a + 1])
                for (int b = p.length - 1; ; --b)
                    if (p[b] > p[a]) {
                        int t = p[a];
                        p[a] = p[b];
                        p[b] = t;
                        for (++a, b = p.length - 1; a < b; ++a, --b) {
                            t = p[a];
                            p[a] = p[b];
                            p[b] = t;
                        }
                        return true;
                    }
        }
        return false;
    }

    <T> List<T>[] createAdjacencyList(int n) {
        List<T>[] res = new List[n];
        for (int i = 0; i < n; i++) {
            res[i] = new ArrayList<>();
        }
        return res;
    }
}

import java.io.PrintWriter;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Scanner;

/**
 * User: serparamon
 */
public class Codeforces_2012_07_30_D {

    private static ArrayList<Integer> list = new ArrayList<Integer>();

    private static int c = 0;

    private static boolean[][] r = new boolean[2000][2000];

    private static void dfs(int v) {
        for (int i=0; i<=c; i++) {
            if (r[v][i]) {
                r[v][i] = false;
                r[i][v] = false;
                dfs(i);
            }
        }
        list.add(v+1);
    }

    private static double side = 10.0;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();

        c = 0;
        double[] x = new double[5*n];
        double[] y = new double[5*n];
        x[0] = -4000.12345678987654321;
        y[0] = -4000.12345678987654321;
        double angle = 2*Math.PI / 5;

        double R = Math.sqrt(side*side / (2 * (1-Math.cos(angle))));

        double[] dx = new double[5];
        double[] dy = new double[5];
        dx[0] = 0;
        dy[0] = 0;
        dx[1] = (Math.cos(2*angle) - Math.cos(3*angle)) * R;
        dy[1] = (Math.sin(2*angle) - Math.sin(3*angle)) * R;
        dx[2] = (Math.cos(1*angle) - Math.cos(3*angle)) * R;
        dy[2] = (Math.sin(1*angle) - Math.sin(3*angle)) * R;
        dx[3] = (Math.cos(0*angle) - Math.cos(3*angle)) * R;
        dy[3] = (Math.sin(0*angle) - Math.sin(3*angle)) * R;
        dx[4] = (Math.cos(4*angle) - Math.cos(3*angle)) * R;
        dy[4] = (Math.sin(4*angle) - Math.sin(3*angle)) * R;

        double XS = x[0];
        double YS = y[0];

        int p = 0;

        for (int i=0; i<n; i++) {
            for (int j=0; j<5; j++) {
                x[j==0 ? p : c+j] = XS + dx[j];
                y[j==0 ? p : c+j] = YS + dy[j];
                r[j==0 ? p : c+j][(j+2)%5==0 ? p : c+(j+2)%5] = true;
                r[j==0 ? p : c+j][(j+3)%5==0 ? p : c+(j+3)%5] = true;
            }
            p = c+2;
            c += 4;
            XS = x[p];
            YS = y[p];
        }

        out.println(c + 1);
        for (int i=0; i<=c; i++) {
            out.println(x[i] + " " + y[i]);
        }

        for (int i=0; i<n; i++) {
            if (i==0) {
                out.print("1 2 3 4 5");
            }
            else {
                out.print(4*i-1);
                for (int j=1; j<5; j++) {
                    out.print(" " + (4*i+j+1));
                }
            }
            out.println();
        }

        dfs(0);

        for (int i=0; i<list.size(); i++) {
            out.print(list.get(i) + " ");
        }
        out.println();

        out.flush();
        out.close();
    }

}

import java.util.*;
import java.io.*;

public class d
{
    static int N;
    static String d1 = "13.090169943749474241"; // 10 + 10sin18
    static String d2 = "9.5105651629515357212"; // 10cos18
    static String d3 = "16.180339887498948482"; // 10 + 20sin18
    static String d4 = "15.388417685876267013"; // 5 tan 72
    static double d, e, f, g;

    static ArrayList<Pair> points = new ArrayList<Pair>();
    static ArrayList<Integer> pq1 = new ArrayList<Integer>();
    static ArrayList<Integer> pq2 = new ArrayList<Integer>();

    static int go(double x, double y)
    {
        Pair next = new Pair(x, y);
        for (int i = 0; i < points.size(); i++)
            if (points.get(i).equals(next))
                return i;
        points.add(next);
        System.out.printf("%.15f %.15f\n", next.x, next.y);
        return points.size() - 1;
    }

    static void solve(double x, double y, int n)
    {
        if (n >= N)
            return;

        if (n % 2 == 0) // right-side up
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y - e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);
            pq2.add(idx[1]);
            solve(cx, cy, n + 1);

            next_x -= 5.0;
            next_y += g;
            idx[2] = go(next_x, next_y);
            pq2.add(idx[2]);

            next_x -= 5.0;
            next_y -= g;
            idx[3] = go(next_x, next_y);
            pq2.add(idx[3]);

            next_x += d;
            next_y += e;
            idx[4] = go(next_x, next_y);
            pq2.add(idx[4]);

            next_x -= f;
            idx[5] = go(next_x, next_y);
            pq2.add(idx[5]);

            pq1.add(idx[0]);
            pq1.add(idx[3]);
            pq1.add(idx[1]);
            pq1.add(idx[4]);
            pq1.add(idx[2]);
        }
        else // upside-down
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y + e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);
            pq2.add(idx[1]);
            solve(cx, cy, n + 1);

            next_x -= 5.0;
            next_y -= g;
            idx[2] = go(next_x, next_y);
            pq2.add(idx[2]);

            next_x -= 5.0;
            next_y += g;
            idx[3] = go(next_x, next_y);
            pq2.add(idx[3]);

            next_x += d;
            next_y -= e;
            idx[4] = go(next_x, next_y);
            pq2.add(idx[4]);

            next_x -= f;
            idx[5] = go(next_x, next_y);
            pq2.add(idx[5]);

            pq1.add(idx[0]);
            pq1.add(idx[3]);
            pq1.add(idx[1]);
            pq1.add(idx[4]);
            pq1.add(idx[2]);
        }
    }

    public static void main(String[] args) throws IOException
    {
        d = Double.parseDouble(d1);
        e = Double.parseDouble(d2);
        f = Double.parseDouble(d3);
        g = Double.parseDouble(d4);

        BufferedReader w = new BufferedReader(new InputStreamReader(System.in));
        N = Integer.parseInt(w.readLine());

        points.add(new Pair(-1.0e10, -1.0e10));

        System.out.println(2 + N * 3);
        solve(0.0, 0.0, 0);
        for (int i = 0; i < pq1.size(); i += 5)
            for (int j = i; j < i + 5; j++)
            {
                System.out.print(pq1.get(j));
                if (j == i + 4) System.out.print("\n");
                else System.out.print(" ");
            }
        System.out.print("1");
        for (int i = 0; i < pq2.size(); i++)
            System.out.print(" " + pq2.get(i));
        System.out.println();

        System.exit(0);
    }

    public static class Pair
    {
        double x, y;
        double epsilon = 1.0e-7;
        public Pair(double a, double b)
        {
            x = a;
            y = b;
        }

        public boolean equals(Pair other)
        {
            return Math.abs(other.x - x) + Math.abs(other.y - y) < epsilon;
        }
    }
}

import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MatchGenerator;

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

	void solve() throws IOException {
		int n=nextInt();
		int[][] star=new int[n][5];
		double angle=Math.toRadians(72);
		double a=10;
		double r=a/Math.sin(angle/2)/2.;
		double q=Math.PI/2+angle;
		int count=4*n+1;
		double[] x=new double[count];
		double[] y=new double[count];
		for(int i=0;i<5;i++){
			x[i]=r*Math.cos(q);
			y[i]=r*Math.sin(q);
			q-=angle;
		}
		double dx=x[0]-x[2];
		double dy=y[0]-y[2];
		double d=Math.sqrt(dx*dx+dy*dy);
		for(int i=5;i<count;i++){
			x[i]=x[i-4]+d;
			y[i]=y[i-4];
		}
		/*
		dx=x[0]-x[1];
		dy=y[0]-y[1];
		d=Math.sqrt(dx*dx+dy*dy);
		out.println(d);*/
		for(int i=0;i<5;i++)star[0][i]=i+1;
		for(int i=1;i<n;i++){
			star[i][0]=star[i-1][2];
			for(int j=1;j<5;j++)
				star[i][j]=star[i-1][j]+4;
		}
		out.println(count);
		for(int i=0;i<count;i++){
			out.printf(Locale.US,"%.12f %.12f\n",x[i],y[i]);
		}
		for(int i=0;i<n;i++){
			for(int j=0;j<5;j++)
				out.print(star[i][j]+" ");
			out.println();
		}
		out.print("1 ");  /*
		for(int i=0;i<n;i++)
			for(int j=1;j<=2;j++)
				out.print(star[i][j]+" ");
		for(int i=n-1;i>=0;i--){
			out.print(star[i][3]+" "+star[i][4]+" "+star[i][0]+" ");
		}                   */
		for(int i=0;i<n;i++)
			out.print(star[i][2]+" ");
		for(int i=n-1;i>=0;i--)
			out.print(star[i][4]+" "+star[i][1]+" "+star[i][3]+" "+star[i][0]+" ");
	}

	public static void main(String[] args) throws IOException {
		new Main().run();
	}

	void run() throws IOException {
		reader = new BufferedReader(new InputStreamReader(System.in));
		tokenizer = null;
		out = new PrintWriter(new OutputStreamWriter(System.out));
		solve();
		reader.close();
		out.flush();

	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter out;

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}
}

import static java.lang.System.in;
import static java.lang.System.out;

import java.awt.Canvas;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Polygon;
import java.awt.geom.Path2D;
import java.awt.geom.Point2D;
import java.io.*;
import java.util.*;

import javax.swing.JFrame;

public class D213{
	/**
	 *
	 */
	static final double EPS = 1e-10;
	static final double INF = 1 << 31;
	static final double PI = Math.PI;

	public static Scanner sc = new Scanner(in);
	StringBuilder sb = new StringBuilder();
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	//ArrayList <Polygon> star = new ArrayList <Polygon>();
	Path2D.Double star = new Path2D.Double();

	public void run() throws IOException {

//		frame = new JFrame("This is my Program!");
//		frame.setSize(400,400);
//		frame.add(this);
//		frame.setBackground(Color.GRAY);
//		frame.setVisible(true);

		String input;
		String[] inputArray;
		input = br.readLine();
		inputArray = input.split(" ");
		int n = Integer.valueOf(inputArray[0]);

		double ver[][] = new double[][]{{3.830127018922193,3.366025403784439},
				{-3.601321235851749,10.057331467373021},
				{0.466045194906253,19.192786043799030},
				{10.411264148588986,18.147501411122495},
				{12.490381056766580,8.366025403784439}};
		double dx = ver[3][0]-ver[0][0];
		double dy = ver[3][1]-ver[0][1];
		ln(4*n+1);
		ln(ver[0][0] + " " + ver[0][1]);
		Point2D.Double[] p= new Point2D.Double[4*n+2];
		p[1]=new Point2D.Double(ver[0][0], ver[0][1]);
		for (int i=0; i<n; i++)
			for (int j=1; j<5; j++){
				ln((ver[j][0]+i*dx) + " " + (ver[j][1]+i*dy));
				p[4*i+j+1]=new Point2D.Double(ver[j][0]+i*dx, ver[j][1] + i*dy);
			}
		ln("1 2 3 4 5");
		for (int i=1; i<n; i++){
			System.out.print(4*i);
			for (int j=2; j<=5; j++)
				System.out.print(" " + (4*i+j));
			ln("");
		}
		System.out.print("1 ");
		for (int i=0; i<n; i++)
			System.out.print((4*i+3) + " " +(4*i+5) + " " +(4*i+2) + " " +(4*i+4) + " ");
		for (int i=n-1; i>=1; i--)
			System.out.print(4*i + " ");
		System.out.print("1");
		star.moveTo(p[1].x+100,p[1].y+100);
		for (int i=0; i<n; i++){
			star.lineTo(p[4*i+3].x+100,p[4*i+3].y+100);
			star.lineTo(p[4*i+5].x+100,p[4*i+5].y+100);
			star.lineTo(p[4*i+2].x+100,p[4*i+2].y+100);
			star.lineTo(p[4*i+4].x+100,p[4*i+4].y+100);
		}
		for (int i=n-1; i>=1; i--)
			star.lineTo(p[4*i].x+100, p[4*i].y+100);
		star.lineTo(p[1].x+100,p[1].y+100);

//		Graphics2D g = (Graphics2D) this.getGraphics();
//		g.setColor(Color.GREEN);
//		g.draw(star);
	}

	//private JFrame frame;

	public static void main(String[] args) throws IOException {
		new D213().run();
	}
	public void paint(Graphics2D g)
	{
	}

	public static void ln(Object obj) {
		out.println(obj);
	}
}

import static java.lang.Math.*;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.exit;
import static java.lang.System.arraycopy;
import static java.util.Arrays.sort;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException {
		try {
			if (new File("input.txt").exists())
				System.setIn(new FileInputStream("input.txt"));
		} catch (SecurityException e) {
		}
		new Thread(null, new Runnable() {
			public void run() {
				try {
					new Main().run();
				} catch (Throwable e) {
					e.printStackTrace();
					exit(999);
				}
			}
		}, "1", 1 << 23).start();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");

	private void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		in.close();
		out.close();
	}

	final int m = 5;
	final double ANGLE = toRadians(36);
	private int[][] num;
	private int sNum;

	private void solve() throws IOException {
		Point[] nextVect = new Point[m];
		{
			Point prev = new Point(10, 0);
			for (int i = 0, k = 0; k < m; i = (i + 2) % 5, k++)
				prev = nextVect[i] = prev.rotate(i == 0 ? ANGLE : (PI - ANGLE));
//			System.err.println(Arrays.toString(nextVect));
//			System.err.println(nextVect[4].dist());
		}

		sNum = nextInt();

		Point[][] pnt = new Point[sNum][m];
		num = new int[sNum][m];
		int cnt = 1;
		ArrayList<Point> pn = new ArrayList<Main.Point>();
		for (int i = 0; i < sNum; i++) {
			if (i == 0) {
				pnt[i][0] = new Point(0, 0);
				num[i][0] = 1;
				pn.add(pnt[i][0]);
			} else {
				pnt[i][0] = pnt[i - 1][2];
				num[i][0] = num[i - 1][2];
			}
			for (int j = 0; j < m - 1; j++) {
				pnt[i][j + 1] = pnt[i][j].add(nextVect[j]);
				num[i][j + 1] = ++cnt;
				pn.add(pnt[i][j + 1]);
			}
		}
		out.println(pn.size());
		for (Point p : pn)
			out.println(p);
		for (int i = 0; i < sNum; i++) {
			for (int j = 0; j < m; j++) {
				if (j != 0)
					out.print(' ');
				out.print(num[i][j]);
			}
			out.println();
		}
		out.print(1);
		print(0);
		out.println();
	}

	void print(int s) {
		if (s == sNum)
			return;
		out.print(' ');
		out.print(num[s][2]);
		print(s + 1);
		for (int i = 4; i != 2; i = (i + 2) % 5) {
			out.print(' ');
			out.print(num[s][i]);
		}
	}

	double getLen() {
		double a = 10;
		double b = 10;
		double phi = toRadians(108);
		return sqrt(a * a + b * b - 2 * a * b * cos(phi));
	}

	class Point {
		double x, y;

		public Point(double x, double y) {
			this.x = x;
			this.y = y;
		}

		public Point rotate(double phi) {
			double cos = cos(phi);
			double sin = sin(phi);
			return new Point(x * cos - y * sin, x * sin + y * cos);
		}

		public Point add(Point v) {
			return new Point(x + v.x, y + v.y);
		}

		@Override
		public String toString() {
			return String.format("%.9f %.9f", x, y);
		}
		double dist() {
			return sqrt(x * x + y * y);
		}
	}

	void chk(boolean b) {
		if (b)
			return;
		System.out.println(new Error().getStackTrace()[1]);
		exit(999);
	}
	void deb(String fmt, Object... args) {
		System.out.printf(Locale.US, fmt + "%n", args);
	}
	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}
}

import java.util.*;
import java.util.Map.Entry;
import java.io.*;
import java.lang.*;
import java.math.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

    void solve() throws Exception {
    	int n = sc.nextInt();
    	int m = 5 + (n - 1) * 4;
    	double[] x = new double[m];
    	double[] y = new double[m];
    	double ang72 = 72.0 * PI / 180.0;
    	double ang18 = 18.0 * PI / 180.0;
    	double ang36 = 36.0 * PI / 180.0;
    	x[0] = -4000;
    	y[0] = -4000;
    	x[1] = x[0] + 10;
    	y[1] = y[0];
    	x[2] = x[1] + 10.0 * cos(ang72);
    	y[2] = y[1] + 10.0 * sin(ang72);
    	x[3] = x[2] - 10.0 * cos(ang36);
    	y[3] = y[2] + 10.0 * sin(ang36);
    	x[4] = x[0] - 10.0 * sin(ang18);
    	y[4] = y[0] + 10.0 * cos(ang18);
    	for (int i = 5; i < m; i++) {
    		x[i] = x[i - 4] + (x[3] - x[0]);
    		y[i] = y[i - 4] + (y[3] - y[0]);
    	}
    	out.println(m);
    	for (int i = 0; i < m; i++) {
    		out.format("%.12f %.12f%n", x[i], y[i]);
    	}
    	for (int i = 0; i < n; i++) {
    		if (i == 0) {
    			for (int j = 0; j < 5; j++) {
    				out.print((j + 1) + " ");
    			}
    		} else {
    			out.print((3 + 4 * (i - 1) + 1) + " ");
    			for (int j = 0; j < 4; j++) {
    				out.print((5 + 4 * (i - 1) + j + 1) + " ");
    			}
    		}
    		out.println();
    	}
    	out.print("1 4 ");
    	int lst = 3;
    	for (int i = 7; i < m; i += 4) {
    		out.print((i + 1) + " ");
    		lst = i;
    	}
    	for (int i = n - 1; i > 0; --i) {
    		out.print((lst - 2 + 1) + " ");
    		out.print((lst + 1 + 1) + " ");
    		out.print((lst - 1 + 1) + " ");
    		out.print((lst - 4 + 1) + " ");
    		lst -= 4;
    	}
    	out.println("2 5 3 1");
    }

    BufferedReader in;
    PrintWriter out;
    FastScanner sc;

    final String INPUT_FILE = "stdin";
    final String OUTPUT_FILE = "stdout";

    static Throwable throwable;

    public static void main(String[] args) throws Throwable {
        Thread thread = new Thread(null, new Solution(), "", (1 << 26));
        thread.start();
        thread.join();
        thread.run();
        if (throwable != null)
            throw throwable;
    }

    public void run() {
        try {
            if (INPUT_FILE.equals("stdin"))
                in = new BufferedReader(new InputStreamReader(System.in));
            else
                in = new BufferedReader(new FileReader(INPUT_FILE));
            if (OUTPUT_FILE.equals("stdout"))
                out = new PrintWriter(System.out);
            else
                out = new PrintWriter(new FileWriter(OUTPUT_FILE));
            sc = new FastScanner(in);
            solve();
        } catch (Exception e) {
            throwable = e;
        } finally {
            out.close();
        }
    }
}

class FastScanner {
    BufferedReader reader;
    StringTokenizer strTok;

    FastScanner(BufferedReader reader) {
        this.reader = reader;
    }

    public String nextToken() throws Exception {
        while (strTok == null || !strTok.hasMoreTokens())
            strTok = new StringTokenizer(reader.readLine());
        return strTok.nextToken();
    }

    public boolean EOF() throws Exception {
    	if (strTok != null && strTok.hasMoreTokens()) {
    		return false;
    	} else {
    		String line = reader.readLine();
    		if (line == null)
    			return true;
    		strTok = new StringTokenizer(line);
    		return false;
    	}
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}

import java.io.*;
import java.util.*;
public class d {
public static void main(String[] args) throws IOException {
	input.init(System.in);
	PrintWriter out = new PrintWriter(System.out);
	ArrayList<Point> res = new ArrayList<Point>();
	int n = input.nextInt();
	Point cur = new Point(0, 0);
	res.add(cur);

	ArrayList<Integer> ps = new ArrayList<Integer>();
	ps.add(0);
	for(int i = 0; i<n; i++)
	{
		cur = new Point(cur.x + 20 * Math.sin(54 * Math.PI / 180), cur.y);
		res.add(cur);
		ps.add(i+1);
	}
	Point[] penta = new Point[5];
	penta[0] = new Point(0, 0);
	penta[1] = new Point(penta[0].x + Math.cos(36 * Math.PI / 180) * 10, penta[0].y + 10 * Math.sin(36 * Math.PI/ 180));
	penta[2] = new Point(penta[1].x + Math.cos(-36 * Math.PI / 180) * 10, penta[1].y + 10 * Math.sin(-36 * Math.PI/ 180));
	penta[3] = new Point(penta[2].x + Math.cos(-108 * Math.PI / 180) * 10, penta[2].y + 10 * Math.sin(-108 * Math.PI/ 180));
	penta[4] = new Point(penta[3].x + Math.cos(-180 * Math.PI / 180) * 10, penta[3].y + 10 * Math.sin(-180 * Math.PI/ 180));
	for(int i = 0; i<n; i++)
	{
		cur = cur.plus(penta[4].minus(penta[2]));
		ps.add(res.size());
		res.add(cur);
		cur = cur.plus(penta[1].minus(penta[4]));
		ps.add(res.size());
		res.add(cur);
		cur = cur.plus(penta[3].minus(penta[1]));
		ps.add(res.size());
		res.add(cur);
		cur = cur.plus(penta[0].minus(penta[3]));
		ps.add(n - 1 - i);
	}
	out.println(res.size());
	for(Point p : res) out.printf("%.12f %.12f\n", p.x,p.y);
	for(int i = 0; i<n; i++)
	{
		out.println((i+1)+" "+(res.size() - 1 - 3 * i)+" "+(i+2)+" "+(res.size() - 0 - 3 * i)+" "+(res.size() - 2 - 3 * i));
	}
	for(int x : ps) out.print(x+1+" ");
	out.println();
	out.close();
}
static class Point
{
	double x, y;
	public Point(double xx, double yy)
	{
		x = xx; y = yy;
	}
	Point plus(Point p)
	{
		return new Point(x + p.x, y + p.y);
	}
	Point minus(Point p)
	{
		return new Point(x - p.x, y - p.y);
	}
}
public static class input {
	static BufferedReader reader;
	static StringTokenizer tokenizer;

	static void init(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input));
		tokenizer = new StringTokenizer("");
	}

	static String next() throws IOException {
		while (!tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(reader.readLine());
		return tokenizer.nextToken();
	}

	static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
}
}

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.io.BufferedWriter;
import java.util.Locale;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Jacob Jiang
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {
    public static final double h = 10 * Math.sin(Math.toRadians(36));
    public static final double l = 10 * Math.cos(Math.toRadians(36));
    public static final double hd = 10 * Math.sin(Math.toRadians(72));
    public static final double ld = 10 * Math.cos(Math.toRadians(72));

	public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.nextInt();
        out.println(4 * n + 1);
        out.printf("%.20f %.20f\n", 0., 0.);
        for (int i = 0; i < n; i++) {
            out.printf("%.20f %.20f\n", 2 * l * i + l, h);
            out.printf("%.20f %.20f\n", 2 * l * i + 2 * l, 0.);
            out.printf("%.20f %.20f\n", 2 * l * i + 2 * l - ld, -hd);
            out.printf("%.20f %.20f\n", 2 * l * i + ld, -hd);
        }
        out.println("1 2 3 4 5");
        for (int i = 1; i < n; i++) {
            out.printLine(4 * i - 1, 4 * i + 2, 4 * i + 3, 4 * i + 4, 4 * i + 5);
        }
        out.print("1");
        for (int i = 0; i < n; i++) {
            out.print(" ");
            out.print(4 * i + 3);
        }
        for (int i = n - 1; i >= 1; i--) {
            out.print(" ");
            out.printItems(4 * i + 5, 4 * i + 2, 4 * i + 4, 4 * i - 1);
        }
        out.print(" 5 2 4 1");
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1 << 20];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c & 15;
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public static boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    }

class OutputWriter {
    private PrintWriter writer;

    public OutputWriter(OutputStream stream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(stream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void println(int x) {
        writer.println(x);
    }

    public void print(int i) {
        writer.print(i);
    }

    public PrintWriter printf(String format, Object... args) {
        return writer.printf(format, args);
    }

    public void print(Object obj) {
        writer.print(obj);
    }

    public void println() {
        writer.println();
    }

    public void println(String x) {
        writer.println(x);
    }

    public void print(char c) {
        writer.print(c);
    }

    public void close() {
        writer.close();
    }

    public void print(String s) {
        writer.print(s);
    }

    public void printItems(Object... items) {
        for (int i = 0; i < items.length; i++) {
            if (i != 0) {
                print(' ');
            }
            print(items[i]);
        }
    }

    public void printLine(Object... items) {
        printItems(items);
        println();
    }

}

//package round131;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class D {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int n = ni();
		double D = 10;
		double U = D * (Math.sqrt(5)+1)/2;
		double S = Math.sqrt((-Math.sqrt(5)+5)/8) * D;
		double T = Math.sqrt((Math.sqrt(5)+5)/8) * D;

		double x = 0, y = 0;
		out.println(5*n-(n-1));
		out.printf("%.10f %.10f\n", x, y);
		double[][] P = new double[][]{
				{U/2, S},
				{U, 0},
				{U/2+0.5*D, -T},
				{U/2-0.5*D, -T}
		};
		for(int i = 0;i < n;i++){
			for(int j = 0;j < 4;j++){
				out.printf("%.10f %.10f\n", x+P[j][0], y+P[j][1]);
			}
			x += U;
		}
		out.println("1 2 3 4 5");
		for(int i = 1;i < n;i++){
			out.print("" + (4*i-1));
			out.print(" " + (4*i+2));
			out.print(" " + (4*i+3));
			out.print(" " + (4*i+4));
			out.print(" " + (4*i+5));
			out.println();
		}
		out.println();
		out.print("1");
		for(int i = 0;i < n;i++){
			out.print(" " + (4*i+3));
		}
		for(int i = n-1;i >= 0;i--){
			out.print(" " + (4*i+5));
			out.print(" " + (4*i+2));
			out.print(" " + (4*i+4));
			if(i > 0)out.print(" " + (4*i-1));
		}
		out.print(" " + 1);
		out.println();
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new D().run();
	}

	public int ni()
	{
		try {
			int num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public long nl()
	{
		try {
			long num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public String ns()
	{
		try{
			int b = 0;
			StringBuilder sb = new StringBuilder();
			while((b = is.read()) != -1 && (b == '\r' || b == '\n' || b == ' '));
			if(b == -1)return "";
			sb.append((char)b);
			while(true){
				b = is.read();
				if(b == -1)return sb.toString();
				if(b == '\r' || b == '\n' || b == ' ')return sb.toString();
				sb.append((char)b);
			}
		} catch (IOException e) {
		}
		return "";
	}

	public char[] ns(int n)
	{
		char[] buf = new char[n];
		try{
			int b = 0, p = 0;
			while((b = is.read()) != -1 && (b == ' ' || b == '\r' || b == '\n'));
			if(b == -1)return null;
			buf[p++] = (char)b;
			while(p < n){
				b = is.read();
				if(b == -1 || b == ' ' || b == '\r' || b == '\n')break;
				buf[p++] = (char)b;
			}
			return Arrays.copyOf(buf, p);
		} catch (IOException e) {
		}
		return null;
	}

	double nd() { return Double.parseDouble(ns()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

import java.util.*;
import static java.lang.Math.*;
public class ProblemD {
	class Point {
		double x, y;
		Point(double x, double y) {
			this.x = x; this.y = y;
		}
		Point add(Point o) {
			return new Point(x + o.x, y + o.y);
		}
		Point sub(Point o) {
			return new Point(x - o.x, y - o.y);
		}
		double len() {
			return Math.hypot(x, y);
		}
		public String toString() {
			return String.format("%.10f %.10f", x, y);
		}
	};

	double r, d, theta;

    void run() {
        Scanner sc = new Scanner(System.in);
        int noStars = sc.nextInt();

        theta = Math.toRadians(360./5);
        //d = Math.sqrt(10 * 10 + 10 * 10 - 2 * 10 * 10 * Math.cos(theta));
        d("d = %s", d);
        r = Math.sqrt(100 / (2 * (1 - Math.cos(theta))));
		d = getCenter(0).add(vec(0)).sub(getCenter(0).add(vec(2))).len();

		d("center 0 = ", getCenter(0).toString());
		d("center 1 = ", getCenter(1));

        p("%s\n", 4 * noStars + 1);
        // Output coordinates with implied order
        p("%s\n", getCenter(0).add(vec(1)).toString());
        for (int star=0; star<noStars; star++) {
        	for (int k : Arrays.asList(0, 4, 3, 2)) {
        		p("%s\n", getCenter(star).add(vec(k)));
        	}
        }

        p("\n");

        // Describe stars
        p("1 ");
        for (int k=0; k<noStars; k++) {
        	for (int z : Arrays.asList(2, 3, 4, 5)) {
        		p("%d ", z + 4 * k);
        	}
        	if (k != 0) {
        		p("%d", 3 + 4 * (k - 1));
        	}
        	p("\n");
        }

        // Describe drawing
        p("1 ");
		int lastPoint = 1 + 2 + 4 * (noStars - 1);
		for (int z = 3; z <= lastPoint; z = z + 4) {
			p("%d ", z);
		}
        for (int k=noStars-1; k>=0; k--) {
        	List<Integer> l;
        	if (k == 0) {
        		l = Arrays.asList(5, 2, 4, 1);
        	} else {
        		l = Arrays.asList(5, 2, 4, -1);
        	}

        	for (int z : l) {
        		p("%d ", z + 4 * k);
        	}
        }
        p("\n");
    }

    Point getCenter(int i) {
    	d("returning %s", new Point(d * i, 0));
    	return new Point(d * i, 0);
    }

    Point vec(int i) {
    	double angle = Math.toRadians(90) + i * theta;
    	return new Point(r * Math.cos(angle), r * Math.sin(angle));
    }

    boolean debug = false;
    void p(String f, Object...params) {
        System.out.printf(f, params);
    }
    void d(Object...params) {
        if (debug) {
            p("DEBUG: %s\n", Arrays.deepToString(params));
        }
    }
    public ProblemD(String[] args) {
        if (args.length > 0 && args[0].equals("debug")) {
            debug = true;
        }
    }
    public static void main(String[] args) {
        new ProblemD(args).run();
    }
}

import java.io.*;
import java.util.*;

public class D {

	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;
	boolean eof;

	class Vector {
		double x, y;

		public Vector(double x, double y) {
			this.x = x;
			this.y = y;
		}

		Vector rotate(double ang) {
			double s = Math.sin(ang);
			double c = Math.cos(ang);
			return new Vector(x * c - y * s, x * s + y * c);
		}

		Vector add(Vector v) {
			return new Vector(x + v.x, y + v.y);
		}

		Vector mult(double coef) {
			return new Vector(coef * x, coef * y);
		}

//		@Override
//		public String toString() {
//			//return "(" + x + ", " + y + ")";
//		}

		void print() {
			out.printf("%.12f %.12f\n", x, y);
		}

	}

	void solve() throws IOException {
		int n = nextInt();
		Vector[] side = new Vector[5];
		side[0] = new Vector(10, 0);
		double alpha = 2 * Math.PI / 5;
		for (int i = 1; i < 5; i++)
			side[i] = side[i - 1].rotate(alpha);

		out.println(4 * n + 1);

		Vector[] star = { side[0].add(side[1]), side[2].add(side[3]),
				side[4].add(side[0]), side[1].add(side[2]),
				side[3].add(side[4]) };

		Vector main = star[4].mult(-1);

		Vector cur = new Vector(0, 0);
		for (int i = 0; i < n; i++)
			for (int j = 0; j < 4; j++) {
				//out.println(cur);
				cur.print();
				cur = cur.add(star[j]);
			}

		//out.println(cur);
		cur.print();
		for (int i = 0; i < n; i++) {
			int x = 4 * i + 1;
			out.println(x + " " + (x + 3) + " " + (x + 1) + " " + (x + 4) + " " + (x + 2));
		}

		for (int i = 0; i < 4 * n + 1; i++)
			out.print((i + 1) + " ");
		for (int i = 4 * n - 4; i > 0; i -= 4)
			out.print((i + 1) + " ");
		out.println(1);

	}

	void inp() throws IOException {
		Locale.setDefault(Locale.US);
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		new D().inp();
	}

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken();
	}

	String nextString() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken("\n");
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

}

import java.util.*;

public class Pentagons {
	static double R = 20*Math.cos(Math.toRadians(36));
	public static void main(String[] args){
		Scanner reader = new Scanner(System.in);
		int n = reader.nextInt();

		Point v = new Point(0,R);
		Point[] dr = new Point[5];
		dr[0] = v;
		for(int i = 1; i < 5; i++)
			dr[i] = dr[i-1].scale(-1).rot(Math.toRadians(36));

		Point[] sol = new Point[5*n-(n-1)];
		sol[0] = new Point(0,0);
		int cnt = 1;
		for(int i = 0; i < n; i++)
			sol[cnt++] = sol[i].add(v);

		for(int i = n-1; i >= 0; i--){
			sol[cnt++] = sol[i+1].add(dr[1]);
			sol[cnt++] = sol[cnt-2].add(dr[2]);
			sol[cnt++] = sol[cnt-2].add(dr[3]);
		}

		int[][] p = new int[n][5];
		for(int i = 0; i < n; i++){
			p[i][0] = i+1;
			p[i][1] = sol.length-3*i-1;
			p[i][2] = i+2;
			p[i][3] = sol.length-3*i;
			p[i][4] = sol.length-3*i-2;
		}

		ArrayList<Integer> out = new ArrayList<Integer>();
		for(int i = 0; i <= n; i++)
			out.add(i+1);
		for(int i = n-1; i >= 0; i--){
			out.add(p[i][4]);
			out.add(p[i][1]);
			out.add(p[i][3]);
			out.add(p[i][0]);
		}

		System.out.println(sol.length);
		for(int i = 0; i < sol.length; i++)
			System.out.println(sol[i]);
		for(int i = 0; i < n; i++){
			for(int j = 0; j < 5; j++)
				System.out.print(p[i][j]+" ");
			System.out.println();
		}
		for(Integer x:out)
			System.out.print(x+" ");
		System.out.println();
	}

	public static class Point implements Comparable<Point>{
		double x,y;
		public Point(double _x, double _y){
			x = _x; y = _y;
		}
		public Point sub(Point p){
			return new Point(x-p.x, y-p.y);
		}
		public Point add(Point p){
			return new Point(x+p.x, y+p.y);
		}
		public Point scale(double L){
			return new Point(x*L, y*L);
		}
		public Point rot(double t){
			double c = Math.cos(t);
			double s = Math.sin(t);
			return new Point(x*c-y*s, x*s+y*c);
		}
		public Point norm(){
			return new Point(x/mag(), y/mag());
		}
		public Point project(Point p){
			return p.scale(dot(p)/p.dot(p));
		}
		public double dot(Point p){
			return x*p.x + y*p.y;
		}
		public double cross(Point p){
			return x*p.y-y*p.x;
		}
		public double angBetween(Point p){
			double d = Math.abs(ang()-p.ang());
			return Math.min(d, 2*Math.PI-d);
		}
		public double mag(){
			return Math.abs(Math.sqrt(x*x + y*y));
		}
		public double ang(){
			double a = Math.atan2(y,x);
			if(a<0) a+=2*Math.PI;
			return a;
		}
		public double dis(Point p){
			return sub(p).mag();
		}
		public int compareTo(Point p){
			if(p.x == x){
				return (int)Math.signum(y-p.y);
			}
			return (int)Math.signum(x-p.x);
		}
		public String toString(){
			return String.format("%.12f %.12f",x,y);
			//return "("+x+", "+y+")";
		}
	}
}

import java.util.List;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.LinkedList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author AlexFetisov
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {

    public static final double ANGLE = 2.51327412;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();

        List<Point>[] points = new List[n];
        for (int i = 0; i < n; ++i) {
            points[i] = new LinkedList<Point>();
            points[i] = getStart(new Point(i * 10., 0));
        }
        out.println(n * 5);
        for (int i = 0; i < n; ++i) {
            out.println((i * 10) + " " + 0);
        }
        for (int i = n-1; i >= 0; --i) {
            for (int j = 1; j < 5; ++j) {
                out.println(points[i].get(j).x + " " + points[i].get(j).y);
            }
        }
    }

    List<Point> getStart(Point p) {
        List<Point> res = new LinkedList<Point>();
        res.add(p);
        Point V = new Point(10, 0);
        p = p.add(new Point(10, 0));
        res.add(p);

        V = V.rotate(-ANGLE);
        p = p.add(V);
        res.add(p);

        V = V.rotate(-ANGLE);
        p = p.add(V);
        res.add(p);

        V = V.rotate(-ANGLE);
        p = p.add(V);
        res.add(p);

        V = V.rotate(-ANGLE);
        p = p.add(V);
        res.add(p);

        return res;
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer stt;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    public String nextString() {
        while (stt == null || !stt.hasMoreTokens()) {
            stt = new StringTokenizer(nextLine());
        }
        return stt.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

}

class Point implements Comparable<Point> {
    public double x, y;

    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public String toString() {
        return "(" + x + ", " + y + " )";
    }

    public boolean equals(Object o) {
        Point p = (Point) o;
        return DoubleUtils.compareTo(x, p.x) == 0 && DoubleUtils.compareTo(y, p.y) == 0;
    }

    public int hashCode() {
        int result;
        long temp;
        temp = x != +0.0d ? Double.doubleToLongBits(x) : 0L;
        result = (int) (temp ^ (temp >>> 32));
        temp = y != +0.0d ? Double.doubleToLongBits(y) : 0L;
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        return result;
    }

    public Point add(Point p) {
        return new Point(x + p.x, y + p.y);
    }

    public Point mul(double k) {
        return new Point(x * k, y * k);
    }

    /*public double distanceToLine(Line l) {
        if (l.hasPoints()) {
            return distanceToLine(l.p1, l.p2);
        }
        Line normLine = l.norm();
        return normLine.a * x + normLine.b * y + normLine.c;
    } */

    // Rotate 90 degrees clockwise (positive direction).
    public Point rotate() {
        return new Point(-y, x);
    }

    // Rotate on alpha (counterclockwise). If alfha < 0, then clockwise.
    public Point rotate(double alpha) {
        return rotate(Math.cos(alpha), Math.sin(alpha));
    }

    // Rotate on alpha (cos, sin).
    public Point rotate(double cosa, double sina) {
        return mul(cosa).add(rotate().mul(sina));
    }

    public int compareTo(Point o) {
        int temp = DoubleUtils.compareTo(x, o.x);
        if (temp == 0) {
            return DoubleUtils.compareTo(y, o.y);
        }
        return temp;
    }
}

class DoubleUtils {
    public static final double EPS = 1e-12;

    public static int compareTo(double a, double b) {
        if (doubleEqual(a, b)) {
            return 0;
        }
        if (a < b) {
            return -1;
        }
        return 1;
    }

    private static boolean doubleEqual(double a, double b) {
        return Math.abs(a - b) < EPS;
    }

}

// practice with rainboy
import java.io.*;
import java.util.*;

public class CF213D extends PrintWriter {
	CF213D() { super(System.out); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		CF213D o = new CF213D(); o.main(); o.flush();
	}

	void main() {
		int n = sc.nextInt();
		double a = Math.PI * 2 / 5;
		double ca = Math.cos(a), sa = Math.sin(a);
		double c2a = Math.cos(a * 2), s2a = Math.sin(a * 2);
		double[] xx = new double[4];
		double[] yy = new double[4];
		xx[0] = -ca; yy[0] = sa;
		xx[1] = 1 + ca + c2a; yy[1] = sa + s2a;
		xx[2] = ca; yy[2] = sa;
		xx[3] = 1; yy[3] = 0;
		println(1 + n * 4);
		double x = 0, y = 0;
		printf("%.9f %.9f\n", x, y);
		for (int i = 0; i < n; i++)
			for (int h = 0; h < 4; h++) {
				x = (xx[h] + i) * 10;
				y = yy[h] * (i % 2 == 0 ? 10 : -10);
				printf("%.9f %.9f\n", x, y);
			}
		for (int i = 0; i < n; i++)
			println((i * 4 + 1) + " " + (i * 4 + 2) + " " + (i * 4 + 3) + " " + (i * 4 + 4) + " " + (i * 4 + 5));
		print(1);
		for (int i = 0; i < n; i++)
			print(" " + (i * 4 + 3) + " " + (i * 4 + 5));
		for (int i = n - 1; i >= 0; i--)
			print(" " + (i * 4 + 2) + " " + (i * 4 + 4) + " " + (i * 4 + 1));
		println();
	}
}

import static java.lang.System.in;
import static java.lang.System.out;

import java.io.*;
import java.util.*;

public class D213 {
	static final double EPS = 1e-10;
	static final double INF = 1 << 31;
	static final double PI = Math.PI;

	public static Scanner sc = new Scanner(in);
	StringBuilder sb = new StringBuilder();
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public void run() throws IOException {
		String input;
		String[] inputArray;
		input = br.readLine();
		inputArray = input.split(" ");
		int n = Integer.valueOf(inputArray[0]);

		double ver[][] = new double[][]{{3.830127018922193,3.366025403784439},
				{-3.601321235851749,10.057331467373021},
				{0.466045194906253,19.192786043799030},
				{10.411264148588986,18.147501411122495},
				{12.490381056766580,8.366025403784439}};
		double dx = ver[3][0]-ver[0][0];
		double dy = ver[3][1]-ver[0][1];
		ln(4*n+1);
		ln(ver[0][0] + " " + ver[0][1]);
		for (int i=0; i<n; i++)
			for (int j=1; j<5; j++)
				ln((ver[j][0]+i*dx) + " " + (ver[j][1]+i*dy));
		ln("1 2 3 4 5");
		for (int i=1; i<n; i++){
			System.out.print(4*i);
			for (int j=2; j<=5; j++)
				System.out.print(" " + (4*i+j));
			ln("");
		}
		System.out.print("1 3 5 2 4 ");
		for (int i=1; i<n; i++)
			System.out.print((4*i+2) + " " +(4*i+4) + " " +(4*i+1) + " " +(4*i+3) + " ");
		System.out.print("1");
	}

	public static void main(String[] args) throws IOException {
		new D213().run();
	}
	public static void ln(Object obj) {
		out.println(obj);
	}
}

import static java.lang.System.in;
import static java.lang.System.out;

import java.io.*;
import java.util.*;

public class D213 {
	static final double EPS = 1e-10;
	static final double INF = 1 << 31;
	static final double PI = Math.PI;

	public static Scanner sc = new Scanner(in);
	StringBuilder sb = new StringBuilder();
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public void run() throws IOException {
		String input;
		String[] inputArray;
		input = br.readLine();
		inputArray = input.split(" ");
		int n = Integer.valueOf(inputArray[0]);

		double ver[][] = new double[][]{{3.830127018922193,3.366025403784439},
				{-3.601321235851749,10.057331467373021},
				{0.466045194906253,19.192786043799030},
				{10.411264148588986,18.147501411122495},
				{12.490381056766580,8.366025403784439}};
		double dx = ver[2][0]-ver[0][0];
		double dy = ver[2][1]-ver[0][1];
		ln(4*n+1);
		ln(ver[0][0] + " " + ver[0][1]);
		for (int i=0; i<n; i++)
			for (int j=1; j<5; j++)
				ln((ver[j][0]+i*dx) + " " + (ver[j][1]+i*dy));
		ln("1 2 3 4 5");
		for (int i=1; i<n; i++){
			System.out.print(4*i);
			for (int j=2; j<=5; j++)
				System.out.print(" " + (4*i+j));
			ln("");
		}
		System.out.print("1 3 5 2 4 ");
		for (int i=1; i<n; i++)
			System.out.print((4*i+2) + " " +(4*i+4) + " " +(4*i+1) + " " +(4*i+3) + " ");
		System.out.print("1");
	}

	public static void main(String[] args) throws IOException {
		new D213().run();
	}
	public static void ln(Object obj) {
		out.println(obj);
	}
}

import static java.lang.Math.*;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.exit;
import static java.lang.System.arraycopy;
import static java.util.Arrays.sort;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException {
		try {
			if (new File("input.txt").exists())
				System.setIn(new FileInputStream("input.txt"));
		} catch (SecurityException e) {
		}
		new Thread(null, new Runnable() {
			public void run() {
				try {
					new Main().run();
				} catch (Throwable e) {
					e.printStackTrace();
					exit(999);
				}
			}
		}, "1", 1 << 23).start();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");

	private void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		in.close();
		out.close();
	}

	final int m = 5;
	final double ANGLE = toRadians(36);
	private int[][] num;
	private int sNum;

	private void solve() throws IOException {
		Point[] nextVect = new Point[m];
		{
			Point prev = new Point(getLen(), 0);
			for (int i = 0, k = 0; k < m; i = (i + 2) % 5, k++)
				prev = nextVect[i] = prev.rotate(i == 0 ? ANGLE : (PI - ANGLE));
//			System.err.println(Arrays.toString(nextVect));
//			System.err.println(nextVect[4].dist());
		}

		sNum = nextInt();

		Point[][] pnt = new Point[sNum][m];
		num = new int[sNum][m];
		int cnt = 1;
		ArrayList<Point> pn = new ArrayList<Main.Point>();
		for (int i = 0; i < sNum; i++) {
			if (i == 0) {
				pnt[i][0] = new Point(0, 0);
				num[i][0] = 1;
				pn.add(pnt[i][0]);
			} else {
				pnt[i][0] = pnt[i - 1][2];
				num[i][0] = num[i - 1][2];
			}
			for (int j = 0; j < m - 1; j++) {
				pnt[i][j + 1] = pnt[i][j].add(nextVect[j]);
				num[i][j + 1] = ++cnt;
				pn.add(pnt[i][j + 1]);
			}
		}
		out.println(pn.size());
		for (Point p : pn)
			out.println(p);
		for (int i = 0; i < sNum; i++) {
			for (int j = 0; j < m; j++) {
				if (j != 0)
					out.print(' ');
				out.print(num[i][j]);
			}
			out.println();
		}
		out.print(1);
		print(0);
		out.println();
	}

	void print(int s) {
		if (s == sNum)
			return;
		out.print(' ');
		out.print(num[s][2]);
		print(s + 1);
		for (int i = 4; i != 2; i = (i + 2) % 5) {
			out.print(' ');
			out.print(num[s][i]);
		}
	}

	double getLen() {
		double a = 10;
		double b = 10;
		double phi = toRadians(108);
		return sqrt(a * a + b * b - 2 * a * b * cos(phi));
	}

	class Point {
		double x, y;

		public Point(double x, double y) {
			this.x = x;
			this.y = y;
		}

		public Point rotate(double phi) {
			double cos = cos(phi);
			double sin = sin(phi);
			return new Point(x * cos - y * sin, x * sin + y * cos);
		}

		public Point add(Point v) {
			return new Point(x + v.x, y + v.y);
		}

		@Override
		public String toString() {
			return String.format("%.9f %.9f", x, y);
		}
		double dist() {
			return sqrt(x * x + y * y);
		}
	}

	void chk(boolean b) {
		if (b)
			return;
		System.out.println(new Error().getStackTrace()[1]);
		exit(999);
	}
	void deb(String fmt, Object... args) {
		System.out.printf(Locale.US, fmt + "%n", args);
	}
	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}
}

import java.util.*;
import java.util.Map.Entry;
import java.io.*;
import java.lang.*;
import java.math.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

    void solve() throws Exception {
    	int n = sc.nextInt();
    	int m = 5 + (n - 1) * 4;
    	double[] x = new double[m];
    	double[] y = new double[m];
    	double ang72 = 72.0 * PI / 180.0;
    	double ang18 = 18.0 * PI / 180.0;
    	double ang36 = 36.0 * PI / 180.0;
    	x[0] = -4000;
    	y[0] = -4000;
    	x[1] = x[0] + 10;
    	y[1] = y[0];
    	x[2] = x[1] + 10.0 * cos(ang72);
    	y[2] = y[1] + 10.0 * sin(ang72);
    	x[3] = x[2] - 10.0 * cos(ang36);
    	y[3] = y[2] + 10.0 * sin(ang36);
    	x[4] = x[0] - 10.0 * sin(ang18);
    	y[4] = y[0] + 10.0 * cos(ang18);
    	for (int i = 5; i < m; i++) {
    		x[i] = x[i - 4] + (x[3] - x[0]);
    		y[i] = y[i - 4] + (y[3] - y[0]);
    	}
    	for (int i = 0; i < m; i++) {
    		out.format("%.12f %.12f%n", x[i], y[i]);
    	}
    	for (int i = 0; i < n; i++) {
    		if (i == 0) {
    			for (int j = 0; j < 5; j++) {
    				out.print((j + 1) + " ");
    			}
    		} else {
    			out.print((3 + 4 * (i - 1) + 1) + " ");
    			for (int j = 0; j < 4; j++) {
    				out.print((5 + 4 * (i - 1) + j + 1) + " ");
    			}
    		}
    		out.println();
    	}
    	out.print("1 4 ");
    	int lst = 3;
    	for (int i = 7; i < m; i += 4) {
    		out.print((i + 1) + " ");
    		lst = i;
    	}
    	for (int i = n - 1; i > 0; --i) {
    		out.print((lst - 2 + 1) + " ");
    		out.print((lst + 1 + 1) + " ");
    		out.print((lst - 1 + 1) + " ");
    		out.print((lst - 4 + 1) + " ");
    		lst -= 4;
    	}
    	out.println("2 5 3 1");
    }

    BufferedReader in;
    PrintWriter out;
    FastScanner sc;

    final String INPUT_FILE = "stdin";
    final String OUTPUT_FILE = "stdout";

    static Throwable throwable;

    public static void main(String[] args) throws Throwable {
        Thread thread = new Thread(null, new Solution(), "", (1 << 26));
        thread.start();
        thread.join();
        thread.run();
        if (throwable != null)
            throw throwable;
    }

    public void run() {
        try {
            if (INPUT_FILE.equals("stdin"))
                in = new BufferedReader(new InputStreamReader(System.in));
            else
                in = new BufferedReader(new FileReader(INPUT_FILE));
            if (OUTPUT_FILE.equals("stdout"))
                out = new PrintWriter(System.out);
            else
                out = new PrintWriter(new FileWriter(OUTPUT_FILE));
            sc = new FastScanner(in);
            solve();
        } catch (Exception e) {
            throwable = e;
        } finally {
            out.close();
        }
    }
}

class FastScanner {
    BufferedReader reader;
    StringTokenizer strTok;

    FastScanner(BufferedReader reader) {
        this.reader = reader;
    }

    public String nextToken() throws Exception {
        while (strTok == null || !strTok.hasMoreTokens())
            strTok = new StringTokenizer(reader.readLine());
        return strTok.nextToken();
    }

    public boolean EOF() throws Exception {
    	if (strTok != null && strTok.hasMoreTokens()) {
    		return false;
    	} else {
    		String line = reader.readLine();
    		if (line == null)
    			return true;
    		strTok = new StringTokenizer(line);
    		return false;
    	}
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.io.BufferedWriter;
import java.util.Locale;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Jacob Jiang
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {
    public static final double h = 10 * Math.sin(Math.toRadians(36));
    public static final double l = 10 * Math.cos(Math.toRadians(36));
    public static final double hd = 10 * Math.sin(Math.toRadians(72));
    public static final double ld = 10 * Math.cos(Math.toRadians(72));

	public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.nextInt();
        out.println(4 * n + 1);
        out.printf("%.20f %.20f\n", 0., 0.);
        for (int i = 0; i < n; i++) {
            out.printf("%.20f %.20f\n", 2 * l * i + l, h);
            out.printf("%.20f %.20f\n", 2 * l * i + 2 * l, 0.);
            out.printf("%.20f %.20f\n", 2 * l * i + ld, -hd);
            out.printf("%.20f %.20f\n", 2 * l * i + 2 * l - ld, -hd);
        }
        out.println("1 2 3 4 5");
        for (int i = 1; i < n; i++) {
            out.printLine(4 * i - 1, 4 * i + 2, 4 * i + 3, 4 * i + 4, 4 * i + 5);
        }
        out.print("1");
        for (int i = 0; i < n; i++) {
            out.print(" ");
            out.print(4 * i + 3);
        }
        for (int i = n - 1; i >= 1; i--) {
            out.print(" ");
            out.printItems(4 * i + 5, 4 * i + 2, 4 * i + 4, 4 * i - 1);
        }
        out.print(" 5 2 4 1");
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1 << 20];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c & 15;
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public static boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    }

class OutputWriter {
    private PrintWriter writer;

    public OutputWriter(OutputStream stream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(stream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void println(int x) {
        writer.println(x);
    }

    public void print(int i) {
        writer.print(i);
    }

    public PrintWriter printf(String format, Object... args) {
        return writer.printf(format, args);
    }

    public void print(Object obj) {
        writer.print(obj);
    }

    public void println() {
        writer.println();
    }

    public void println(String x) {
        writer.println(x);
    }

    public void print(char c) {
        writer.print(c);
    }

    public void close() {
        writer.close();
    }

    public void print(String s) {
        writer.print(s);
    }

    public void printItems(Object... items) {
        for (int i = 0; i < items.length; i++) {
            if (i != 0) {
                print(' ');
            }
            print(items[i]);
        }
    }

    public void printLine(Object... items) {
        printItems(items);
        println();
    }

}

import java.util.*;
import static java.lang.Math.*;
public class ProblemD {
	class Point {
		double x, y;
		Point(double x, double y) {
			this.x = x; this.y = y;
		}
		Point add(Point o) {
			return new Point(x + o.x, y + o.y);
		}
		Point sub(Point o) {
			return new Point(x - o.x, y - o.y);
		}
		double len() {
			return Math.hypot(x, y);
		}
		public String toString() {
			return String.format("%.10f %.10f", x, y);
		}
	};

	double r, d, theta;

    void run() {
        Scanner sc = new Scanner(System.in);
        int noStars = sc.nextInt();

        theta = Math.toRadians(360./5);
        //d = Math.sqrt(10 * 10 + 10 * 10 - 2 * 10 * 10 * Math.cos(theta));
        d("d = %s", d);
        r = Math.sqrt(100 / (2 * (1 - Math.cos(theta))));
		d = getCenter(0).add(vec(0)).sub(getCenter(0).add(vec(2))).len();

		d("center 0 = ", getCenter(0).toString());
		d("center 1 = ", getCenter(1));

        p("%s\n", 4 * noStars + 1);
        // Output coordinates with implied order
        p("%s\n", getCenter(0).add(vec(1)).toString());
        for (int star=0; star<noStars; star++) {
        	for (int k : Arrays.asList(0, 4, 3, 2)) {
        		p("%s\n", getCenter(star).add(vec(k)));
        	}
        }

        p("\n");

        // Describe stars
        p("1 ");
        for (int k=0; k<noStars; k++) {
        	for (int z : Arrays.asList(2, 3, 4, 5)) {
        		p("%d ", z + 4 * k);
        	}
        	if (k != 0) {
        		p("%d", 3 + 4 * (k - 1));
        	}
        	p("\n");
        }

        // Describe drawing
        p("1 ");
        p("%d ", 1 + 2 + 4 * (noStars - 1));
        for (int k=noStars-1; k>=0; k--) {
        	List<Integer> l;
        	if (k == 0) {
        		l = Arrays.asList(5, 2, 4, 1);
        	} else {
        		l = Arrays.asList(5, 2, 4, -1);
        	}

        	for (int z : l) {
        		p("%d ", z + 4 * k);
        	}
        }
        p("\n");
    }

    Point getCenter(int i) {
    	d("returning %s", new Point(d * i, 0));
    	return new Point(d * i, 0);
    }

    Point vec(int i) {
    	double angle = Math.toRadians(90) + i * theta;
    	return new Point(r * Math.cos(angle), r * Math.sin(angle));
    }

    boolean debug = false;
    void p(String f, Object...params) {
        System.out.printf(f, params);
    }
    void d(Object...params) {
        if (debug) {
            p("DEBUG: %s\n", Arrays.deepToString(params));
        }
    }
    public ProblemD(String[] args) {
        if (args.length > 0 && args[0].equals("debug")) {
            debug = true;
        }
    }
    public static void main(String[] args) {
        new ProblemD(args).run();
    }
}

import java.util.*;
import static java.lang.Math.*;
public class ProblemD {
	class Point {
		double x, y;
		Point(double x, double y) {
			this.x = x; this.y = y;
		}
		Point add(Point o) {
			return new Point(x + o.x, y + o.y);
		}
		Point sub(Point o) {
			return new Point(x - o.x, y - o.y);
		}
		double len() {
			return Math.hypot(x, y);
		}
		public String toString() {
			return String.format("%.10f %.10f", x, y);
		}
	};

	double r, d, theta;

    void run() {
        Scanner sc = new Scanner(System.in);
        int noStars = sc.nextInt();

        theta = Math.toRadians(360./5);
        //d = Math.sqrt(10 * 10 + 10 * 10 - 2 * 10 * 10 * Math.cos(theta));
        d("d = %s", d);
        r = Math.sqrt(100 / (2 * (1 - Math.cos(theta))));
		d = getCenter(0).add(vec(0)).sub(getCenter(0).add(vec(2))).len();

		d("center 0 = ", getCenter(0).toString());
		d("center 1 = ", getCenter(1));

        p("%s\n", 4 * noStars + 1);
        // Output coordinates with implied order
        p("%s\n", getCenter(0).add(vec(1)).toString());
        for (int star=0; star<noStars; star++) {
        	for (int k : Arrays.asList(0, 4, 3, 2)) {
        		p("%s\n", getCenter(star).add(vec(k)));
        	}
        }

        p("\n");

        // Describe stars
        p("1 ");
        for (int k=0; k<noStars; k++) {
        	for (int z : Arrays.asList(2, 3, 4, 5)) {
        		p("%d ", z + 4 * k);
        	}
        	if (k != 0) {
        		p("%d", 3 + 4 * (k - 1));
        	}
        	p("\n");
        }

        // Describe drawing
        p("1 ");
		int lastPoint = 1 + 2 + 4 * (noStars - 1);
		for (int z = 3; z <= lastPoint; z = z + 4) {
			p("%d ", z);
		}
        p("%d ", 1 + 2 + 4 * (noStars - 1));
        for (int k=noStars-1; k>=0; k--) {
        	List<Integer> l;
        	if (k == 0) {
        		l = Arrays.asList(5, 2, 4, 1);
        	} else {
        		l = Arrays.asList(5, 2, 4, -1);
        	}

        	for (int z : l) {
        		p("%d ", z + 4 * k);
        	}
        }
        p("\n");
    }

    Point getCenter(int i) {
    	d("returning %s", new Point(d * i, 0));
    	return new Point(d * i, 0);
    }

    Point vec(int i) {
    	double angle = Math.toRadians(90) + i * theta;
    	return new Point(r * Math.cos(angle), r * Math.sin(angle));
    }

    boolean debug = false;
    void p(String f, Object...params) {
        System.out.printf(f, params);
    }
    void d(Object...params) {
        if (debug) {
            p("DEBUG: %s\n", Arrays.deepToString(params));
        }
    }
    public ProblemD(String[] args) {
        if (args.length > 0 && args[0].equals("debug")) {
            debug = true;
        }
    }
    public static void main(String[] args) {
        new ProblemD(args).run();
    }
}

// practice with rainboy
import java.io.*;
import java.util.*;

public class CF213D extends PrintWriter {
	CF213D() { super(System.out); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		CF213D o = new CF213D(); o.main(); o.flush();
	}

	void main() {
		int n = sc.nextInt();
		double a = Math.PI * 2 / 5;
		double ca = Math.cos(a), sa = Math.sin(a);
		double c2a = Math.cos(a * 2), s2a = Math.sin(a * 2);
		double[] xx = new double[4];
		double[] yy = new double[4];
		xx[0] = -ca; yy[0] = sa;
		xx[1] = 1 + ca + c2a; yy[1] = sa + s2a;
		xx[2] = ca; yy[2] = sa;
		xx[3] = 1; yy[3] = 0;
		println(1 + n * 4);
		println(0 + " " + 0);
		for (int i = 0; i < n; i++)
			for (int h = 0; h < 4; h++) {
				double x = (xx[h] + i) * 10;
				double y = yy[h] * (i % 2 == 0 ? 10 : -10);
				println(x + " " + y);
			}
		for (int i = 0; i < n; i++)
			println((i * 4 + 1) + " " + (i * 4 + 2) + " " + (i * 4 + 3) + " " + (i * 4 + 4) + " " + (i * 4 + 5));
		print(1);
		for (int i = 0; i < n; i++)
			print(" " + (i * 4 + 3) + " " + (i * 4 + 5));
		for (int i = n - 1; i >= 0; i--)
			print(" " + (i * 4 + 2) + " " + (i * 4 + 4) + " " + (i * 4 + 1));
		println();
	}
}

import java.io.PrintWriter;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Scanner;

/**
 * User: serparamon
 */
public class Codeforces_2012_07_30_D {

    private static ArrayList<Integer> list = new ArrayList<Integer>();

    private static int c = 0;

    private static boolean[][] r = new boolean[2000][2000];

    private static void dfs(int v) {
        for (int i=0; i<=c; i++) {
            if (r[v][i]) {
                r[v][i] = false;
                r[i][v] = false;
                dfs(i);
            }
        }
        list.add(v+1);
    }

    private static double side = 10.0;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();

        c = 0;
        double[] x = new double[5*n];
        double[] y = new double[5*n];
        x[0] = -4000.12345678987654321;
        y[0] = -4000.12345678987654321;
        double angle = 2*Math.PI / 5;

        double R = Math.sqrt(side*side / (2 * (1-Math.cos(angle))));

        double[] dx = new double[5];
        double[] dy = new double[5];
        dx[0] = 0;
        dy[0] = 0;
        dx[1] = (Math.cos(2*angle) - Math.cos(3*angle)) * R;
        dy[1] = (Math.sin(2*angle) - Math.sin(3*angle)) * R;
        dx[2] = (Math.cos(1*angle) - Math.cos(3*angle)) * R;
        dy[2] = (Math.sin(1*angle) - Math.sin(3*angle)) * R;
        dx[3] = (Math.cos(0*angle) - Math.cos(3*angle)) * R;
        dy[3] = (Math.sin(0*angle) - Math.sin(3*angle)) * R;
        dx[4] = (Math.cos(4*angle) - Math.cos(3*angle)) * R;
        dy[4] = (Math.sin(4*angle) - Math.sin(3*angle)) * R;

        double XS = x[0];
        double YS = y[0];

        int p = 0;

        for (int i=0; i<n; i++) {
            for (int j=0; j<5; j++) {
                x[j==0 ? p : c+j] = XS + dx[j];
                y[j==0 ? p : c+j] = YS + dy[j];
                r[j==0 ? p : c+j][(j+2)%5==0 ? p : c+(j+2)%5] = true;
                r[j==0 ? p : c+j][(j+3)%5==0 ? p : c+(j+3)%5] = true;
            }
            p = c+2;
            c += 4;
        }

        out.println(c + 1);
        for (int i=0; i<=c; i++) {
            out.println(x[i] + " " + y[i]);
        }

        for (int i=0; i<n; i++) {
            if (i==0) {
                out.print("1 2 3 4 5");
            }
            else {
                out.print(4*i-1);
                for (int j=1; j<5; j++) {
                    out.print(" " + (4*i+j+1));
                }
            }
            out.println();
        }

        dfs(0);

        for (int i=0; i<list.size(); i++) {
            out.print(list.get(i) + " ");
        }
        out.println();

        out.flush();
        out.close();
    }

}

import java.io.PrintWriter;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Scanner;

/**
 * User: serparamon
 */
public class Codeforces_2012_07_30_D {

    private static ArrayList<Integer> list = new ArrayList<Integer>();

    private static int c = 0;

    private static boolean[][] r = new boolean[2000][2000];

    private static void dfs(int v) {
        for (int i=0; i<=c; i++) {
            if (r[v][i]) {
                r[v][i] = false;
                r[i][v] = false;
                dfs(i);
            }
        }
        list.add(v+1);
    }

    private static double side = 10.0;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();

        c = 0;
        double[] x = new double[5*n];
        double[] y = new double[5*n];
        x[0] = -4000.12345678987654321;
        y[0] = -4000.12345678987654321;
        double angle = 2*Math.PI / 5;

        double R = Math.sqrt(side*side / (2 * (1-Math.cos(angle))));

        double[] dx = new double[5];
        double[] dy = new double[5];
        dx[0] = 0;
        dy[0] = 0;
        dx[1] = (Math.cos(2*angle) - Math.cos(3*angle)) * R;
        dy[1] = (Math.sin(2*angle) - Math.sin(3*angle)) * R;
        dx[2] = (Math.cos(1*angle) - Math.cos(3*angle)) * R;
        dy[2] = (Math.sin(1*angle) - Math.sin(3*angle)) * R;
        dx[3] = (Math.cos(0*angle) - Math.cos(3*angle)) * R;
        dy[3] = (Math.sin(0*angle) - Math.sin(3*angle)) * R;
        dx[4] = (Math.cos(4*angle) - Math.cos(3*angle)) * R;
        dy[4] = (Math.sin(4*angle) - Math.sin(3*angle)) * R;
        for (int i=0; i<n; i++) {
            for (int j=0; j<5; j++) {
                x[c+j] = x[c] + dx[j];
                y[c+j] = y[c] + dy[j];
                r[c+j][c+(j+2)%5] = true;
                r[c+j][c+(j+3)%5] = true;
            }
            c += 4;
        }

        out.println(c + 1);
        for (int i=0; i<=c; i++) {
            out.println(x[i] + " " + y[i]);
        }

        for (int i=0; i<n; i++) {
            for (int j=1; j<=5; j++) {
                out.print((4*i + j) + " ");
            }
            out.println();
        }

        dfs(0);

        for (int i=0; i<list.size(); i++) {
            out.print(list.get(i) + " ");
        }
        out.println();

        out.flush();
        out.close();
    }

}

import java.io.PrintWriter;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Scanner;

/**
 * User: serparamon
 */
public class Codeforces_2012_07_30_D {

    private static ArrayList<Integer> list = new ArrayList<Integer>();

    private static int c = 0;

    private static boolean[][] r = new boolean[2000][2000];

    private static void dfs(int v) {
        for (int i=0; i<=c; i++) {
            if (r[v][i]) {
                r[v][i] = false;
                r[i][v] = false;
                dfs(i);
            }
        }
        list.add(v+1);
    }

    private static double side = 10.0;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();

        c = 0;
        double[] x = new double[5*n];
        double[] y = new double[5*n];
        x[0] = -4000.12345678987654321;
        y[0] = -4000.12345678987654321;
        double angle = 2*Math.PI / 5;

        double R = Math.sqrt(side*side / (2 * (1-Math.cos(angle))));

        double[] dx = new double[5];
        double[] dy = new double[5];
        dx[0] = 0;
        dy[0] = 0;
        dx[1] = (Math.cos(2*angle) - Math.cos(3*angle)) * R;
        dy[1] = (Math.sin(2*angle) - Math.sin(3*angle)) * R;
        dx[2] = (Math.cos(1*angle) - Math.cos(3*angle)) * R;
        dy[2] = (Math.sin(1*angle) - Math.sin(3*angle)) * R;
        dx[3] = (Math.cos(0*angle) - Math.cos(3*angle)) * R;
        dy[3] = (Math.sin(0*angle) - Math.sin(3*angle)) * R;
        dx[4] = (Math.cos(4*angle) - Math.cos(3*angle)) * R;
        dy[4] = (Math.sin(4*angle) - Math.sin(3*angle)) * R;

        double XS = x[0];
        double YS = y[0];

        int p = 0;

        for (int i=0; i<n; i++) {
            for (int j=0; j<5; j++) {
                x[j==0 ? p : c+j] = XS + dx[j];
                y[j==0 ? p : c+j] = YS + dy[j];
                r[j==0 ? p : c+j][(j+2)%5==0 ? p : c+(j+2)%5] = true;
                r[j==0 ? p : c+j][(j+3)%5==0 ? p : c+(j+3)%5] = true;
            }
            p = c+2;
            c += 4;
        }

        out.println(c + 1);
        for (int i=0; i<=c; i++) {
            out.println(x[i] + " " + y[i]);
        }

        for (int i=0; i<n; i++) {
            for (int j=1; j<=5; j++) {
                out.print((4*i + j) + " ");
            }
            out.println();
        }

        dfs(0);

        for (int i=0; i<list.size(); i++) {
            out.print(list.get(i) + " ");
        }
        out.println();

        out.flush();
        out.close();
    }

}

import java.util.*;
import java.io.*;

public class d
{
    static int N;
    static String d1 = "13.090169943749474241"; // 10 + 10sin18
    static String d2 = "9.5105651629515357212"; // 10cos18
    static String d3 = "16.180339887498948482"; // 10 + 20sin18
    static String d4 = "15.388417685876267013"; // 5 tan 72
    static double d, e, f, g;

    static ArrayList<Pair> points = new ArrayList<Pair>();;

    static int go(double x, double y)
    {
        Pair next = new Pair(x, y);
        for (int i = 0; i < points.size(); i++)
            if (points.get(i).equals(next))
                return i;
        points.add(next);
        System.out.printf("%.15f %.15f\n", next.x, next.y);
        return points.size() - 1;
    }

    static void solve(double x, double y, int n, boolean print_out)
    {
        if (n >= N)
            return;

        if (n % 2 == 0) // right-side up
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y - e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y += e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[0], idx[3], idx[1], idx[4], idx[2]);
                System.out.printf("1 3 5 2 4 1\n");
            }

            solve(cx, cy, n + 1, print_out);
        }
        else // upside-down
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y + e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y -= e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[0], idx[3], idx[1], idx[4], idx[2]);
                System.out.printf("1 3 5 2 4 1\n");
            }

            solve(cx, cy, n + 1, print_out);
        }
    }

    public static void main(String[] args) throws IOException
    {
        d = Double.parseDouble(d1);
        e = Double.parseDouble(d2);
        f = Double.parseDouble(d3);
        g = Double.parseDouble(d4);

        BufferedReader w = new BufferedReader(new InputStreamReader(System.in));
        N = Integer.parseInt(w.readLine());

        points.add(new Pair(-1.0e10, -1.0e10));

        System.out.println(2 + N * 3);
        solve(0.0, 0.0, 0, false);
        solve(0.0, 0.0, 0, true);

        System.exit(0);
    }

    public static class Pair
    {
        double x, y;
        double epsilon = 1.0e-7;
        public Pair(double a, double b)
        {
            x = a;
            y = b;
        }

        public boolean equals(Pair other)
        {
            return Math.abs(other.x - x) + Math.abs(other.y - y) < epsilon;
        }
    }
}

import java.util.*;
import java.io.*;

public class d
{
    static int N;
    static String d1 = "13.090169943749474241"; // 10 + 10sin18
    static String d2 = "9.5105651629515357212"; // 10cos18
    static String d3 = "16.180339887498948482"; // 10 + 20sin18
    static String d4 = "15.388417685876267013"; // 5 tan 72
    static double d, e, f, g;

    static ArrayList<Pair> points = new ArrayList<Pair>();;

    static int go(double x, double y)
    {
        Pair next = new Pair(x, y);
        for (int i = 0; i < points.size(); i++)
            if (points.get(i).equals(next))
                return i;
        points.add(next);
        System.out.printf("%.15f %.15f\n", next.x, next.y);
        return points.size() - 1;
    }

    static void solve(double x, double y, int n, boolean print_out)
    {
        if (n >= N)
            return;

        if (n % 2 == 0) // right-side up
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y - e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y += e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[1], idx[4], idx[2], idx[5], idx[3]);
                System.out.printf("%d %d %d %d %d %d\n", idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]);
            }

            solve(cx, cy, n + 1, print_out);
        }
        else // upside-down
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y + e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y -= e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[1], idx[4], idx[2], idx[5], idx[3]);
                System.out.printf("%d %d %d %d %d %d\n", idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]);
            }

            solve(cx, cy, n + 1, print_out);
        }
    }

    public static void main(String[] args) throws IOException
    {
        d = Double.parseDouble(d1);
        e = Double.parseDouble(d2);
        f = Double.parseDouble(d3);
        g = Double.parseDouble(d4);

        BufferedReader w = new BufferedReader(new InputStreamReader(System.in));
        N = Integer.parseInt(w.readLine());

        points.add(new Pair(-1.0e10, -1.0e10));

        solve(0.0, 0.0, 0, false);
        System.out.println(points.size());
        solve(0.0, 0.0, 0, true);

        System.exit(0);
    }

    public static class Pair
    {
        double x, y;
        double epsilon = 1.0e-7;
        public Pair(double a, double b)
        {
            x = a;
            y = b;
        }

        public boolean equals(Pair other)
        {
            return Math.abs(other.x - x) + Math.abs(other.y - y) < epsilon;
        }
    }
}

import java.util.*;
import java.io.*;

public class d
{
    static int N;
    static String d1 = "13.090169943749474241"; // 10 + 10sin18
    static String d2 = "9.5105651629515357212"; // 10cos18
    static String d3 = "16.180339887498948482"; // 10 + 20sin18
    static String d4 = "15.388417685876267013"; // 5 tan 72
    static double d, e, f, g;

    static ArrayList<Pair> points = new ArrayList<Pair>();;

    static int go(double x, double y)
    {
        Pair next = new Pair(x, y);
        for (int i = 0; i < points.size(); i++)
            if (points.get(i).equals(next))
                return i;
        points.add(next);
        System.out.printf("%.15f %.15f\n", next.x, next.y);
        return points.size() - 1;
    }

    static void solve(double x, double y, int n, boolean print_out)
    {
        if (n >= N)
            return;

        if (n % 2 == 0) // right-side up
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y - e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y += e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[0], idx[3], idx[1], idx[4], idx[2]);
                System.out.printf("1 2 3 4 5 1\n");
            }

            solve(cx, cy, n + 1, print_out);
        }
        else // upside-down
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y + e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y -= e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[0], idx[3], idx[1], idx[4], idx[2]);
                System.out.printf("1 2 3 4 5 1\n");
            }

            solve(cx, cy, n + 1, print_out);
        }
    }

    public static void main(String[] args) throws IOException
    {
        d = Double.parseDouble(d1);
        e = Double.parseDouble(d2);
        f = Double.parseDouble(d3);
        g = Double.parseDouble(d4);

        BufferedReader w = new BufferedReader(new InputStreamReader(System.in));
        N = Integer.parseInt(w.readLine());

        points.add(new Pair(-1.0e10, -1.0e10));

        System.out.println(2 + N * 3);
        solve(0.0, 0.0, 0, false);
        solve(0.0, 0.0, 0, true);

        System.exit(0);
    }

    public static class Pair
    {
        double x, y;
        double epsilon = 1.0e-7;
        public Pair(double a, double b)
        {
            x = a;
            y = b;
        }

        public boolean equals(Pair other)
        {
            return Math.abs(other.x - x) + Math.abs(other.y - y) < epsilon;
        }
    }
}

import java.util.*;
import java.io.*;

public class d
{
    static int N;
    static String d1 = "13.090169943749474241"; // 10 + 10sin18
    static String d2 = "9.5105651629515357212"; // 10cos18
    static String d3 = "16.180339887498948482"; // 10 + 20sin18
    static String d4 = "15.388417685876267013"; // 5 tan 72
    static double d, e, f, g;

    static ArrayList<Pair> points = new ArrayList<Pair>();;

    static int go(double x, double y)
    {
        Pair next = new Pair(x, y);
        for (int i = 0; i < points.size(); i++)
            if (points.get(i).equals(next))
                return i;
        points.add(next);
        System.out.printf("%.15f %.15f\n", next.x, next.y);
        return points.size() - 1;
    }

    static void solve(double x, double y, int n, boolean print_out)
    {
        if (n >= N)
            return;

        if (n % 2 == 0) // right-side up
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y - e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y += e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[1], idx[4], idx[2], idx[5], idx[3]);
                System.out.printf("1 2 3 4 5 1\n");
            }

            solve(cx, cy, n + 1, print_out);
        }
        else // upside-down
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y + e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y -= e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[1], idx[4], idx[2], idx[5], idx[3]);
                System.out.printf("1 2 3 4 5 1\n");
            }

            solve(cx, cy, n + 1, print_out);
        }
    }

    public static void main(String[] args) throws IOException
    {
        d = Double.parseDouble(d1);
        e = Double.parseDouble(d2);
        f = Double.parseDouble(d3);
        g = Double.parseDouble(d4);

        BufferedReader w = new BufferedReader(new InputStreamReader(System.in));
        N = Integer.parseInt(w.readLine());

        points.add(new Pair(-1.0e10, -1.0e10));

        System.out.println(2 + N * 3);
        solve(0.0, 0.0, 0, false);
        solve(0.0, 0.0, 0, true);

        System.exit(0);
    }

    public static class Pair
    {
        double x, y;
        double epsilon = 1.0e-7;
        public Pair(double a, double b)
        {
            x = a;
            y = b;
        }

        public boolean equals(Pair other)
        {
            return Math.abs(other.x - x) + Math.abs(other.y - y) < epsilon;
        }
    }
}

import java.util.*;
import java.io.*;

public class d
{
    static int N;
    static String d1 = "13.090169943749474241"; // 10 + 10sin18
    static String d2 = "9.5105651629515357212"; // 10cos18
    static String d3 = "16.180339887498948482"; // 10 + 20sin18
    static String d4 = "15.388417685876267013"; // 5 tan 72
    static double d, e, f, g;

    static ArrayList<Pair> points = new ArrayList<Pair>();;

    static int go(double x, double y)
    {
        Pair next = new Pair(x, y);
        for (int i = 0; i < points.size(); i++)
            if (points.get(i).equals(next))
                return i;
        points.add(next);
        System.out.printf("%.15f %.15f\n", next.x, next.y);
        return points.size() - 1;
    }

    static void solve(double x, double y, int n, boolean print_out)
    {
        if (n >= N)
            return;

        if (n % 2 == 0) // right-side up
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y - e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y += e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[0], idx[3], idx[1], idx[4], idx[2]);
                System.out.printf("%d %d %d %d %d %d\n", idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]);
            }

            solve(cx, cy, n + 1, print_out);
        }
        else // upside-down
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y + e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y -= e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[0], idx[3], idx[1], idx[4], idx[2]);
                System.out.printf("%d %d %d %d %d %d\n", idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]);
            }

            solve(cx, cy, n + 1, print_out);
        }
    }

    public static void main(String[] args) throws IOException
    {
        d = Double.parseDouble(d1);
        e = Double.parseDouble(d2);
        f = Double.parseDouble(d3);
        g = Double.parseDouble(d4);

        BufferedReader w = new BufferedReader(new InputStreamReader(System.in));
        N = Integer.parseInt(w.readLine());

        points.add(new Pair(-1.0e10, -1.0e10));

        System.out.println(2 + N * 3);
        solve(0.0, 0.0, 0, false);
        solve(0.0, 0.0, 0, true);

        System.exit(0);
    }

    public static class Pair
    {
        double x, y;
        double epsilon = 1.0e-7;
        public Pair(double a, double b)
        {
            x = a;
            y = b;
        }

        public boolean equals(Pair other)
        {
            return Math.abs(other.x - x) + Math.abs(other.y - y) < epsilon;
        }
    }
}

import java.util.*;
import java.io.*;

public class d
{
    static int N;
    static String d1 = "13.090169943749474241"; // 10 + 10sin18
    static String d2 = "9.5105651629515357212"; // 10cos18
    static String d3 = "16.180339887498948482"; // 10 + 20sin18
    static String d4 = "15.388417685876267013"; // 5 tan 72
    static double d, e, f, g;

    static ArrayList<Pair> points = new ArrayList<Pair>();;

    static int go(double x, double y)
    {
        Pair next = new Pair(x, y);
        for (int i = 0; i < points.size(); i++)
            if (points.get(i).equals(next))
                return i;
        points.add(next);
        System.out.printf("%.15f %.15f\n", next.x, next.y);
        return points.size() - 1;
    }

    static void solve(double x, double y, int n, boolean print_out)
    {
        if (n >= N)
            return;

        if (n % 2 == 0) // right-side up
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y - e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y += e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[1], idx[4], idx[2], idx[5], idx[3]);
                System.out.printf("%d %d %d %d %d %d\n", idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]);
            }

            solve(cx, cy, n + 1, print_out);
        }
        else // upside-down
        {
            int[] idx = new int[6];
            idx[0] = go(x, y);

            double next_x = x + d;
            double next_y = y + e;
            double cx = next_x;
            double cy = next_y;
            idx[1] = go(next_x, next_y);

            next_x -= 5.0;
            next_y -= g;
            idx[2] = go(next_x, next_y);

            next_x -= 5.0;
            next_y += g;
            idx[3] = go(next_x, next_y);

            next_x += d;
            next_y -= e;
            idx[4] = go(next_x, next_y);

            next_x -= f;
            idx[5] = go(next_x, next_y);

            if (print_out)
            {
                System.out.printf("%d %d %d %d %d\n", idx[1], idx[4], idx[2], idx[5], idx[3]);
                System.out.printf("%d %d %d %d %d %d\n", idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]);
            }

            solve(cx, cy, n + 1, print_out);
        }
    }

    public static void main(String[] args) throws IOException
    {
        d = Double.parseDouble(d1);
        e = Double.parseDouble(d2);
        f = Double.parseDouble(d3);
        g = Double.parseDouble(d4);

        BufferedReader w = new BufferedReader(new InputStreamReader(System.in));
        N = Integer.parseInt(w.readLine());

        points.add(new Pair(-1.0e10, -1.0e10));

        System.out.println(2 + N * 3);
        solve(0.0, 0.0, 0, false);
        solve(0.0, 0.0, 0, true);

        System.exit(0);
    }

    public static class Pair
    {
        double x, y;
        double epsilon = 1.0e-7;
        public Pair(double a, double b)
        {
            x = a;
            y = b;
        }

        public boolean equals(Pair other)
        {
            return Math.abs(other.x - x) + Math.abs(other.y - y) < epsilon;
        }
    }
}

import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MatchGenerator;

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

	void solve() throws IOException {
		int n=nextInt();
		int[][] star=new int[n][5];
		double angle=Math.toRadians(72);
		double a=10;
		double r=a/Math.sin(angle/2)/2.;
		double q=Math.PI+angle;
		int count=4*n+1;
		double[] x=new double[count];
		double[] y=new double[count];
		for(int i=0;i<5;i++){
			x[i]=r*Math.cos(q);
			y[i]=r*Math.sin(q);
			q-=angle;
		}
		double dx=x[0]-x[2];
		double dy=y[0]-y[2];
		double d=Math.sqrt(dx*dx+dy*dy);
		for(int i=5;i<count;i++){
			x[i]=x[i-4]+d;
			y[i]=y[i-4];
		}
		/*
		dx=x[0]-x[1];
		dy=y[0]-y[1];
		d=Math.sqrt(dx*dx+dy*dy);
		out.println(d);*/
		for(int i=0;i<5;i++)star[0][i]=i+1;
		for(int i=1;i<n;i++){
			star[i][0]=star[i-1][2];
			for(int j=1;j<5;j++)
				star[i][j]=star[i-1][j]+4;
		}
		out.println(count);
		for(int i=0;i<count;i++){
			out.printf(Locale.US,"%.12f %.12f\n",x[i],y[i]);
		}
		for(int i=0;i<n;i++){
			for(int j=0;j<5;j++)
				out.print(star[i][j]+" ");
			out.println();
		}
		out.print("1 ");  /*
		for(int i=0;i<n;i++)
			for(int j=1;j<=2;j++)
				out.print(star[i][j]+" ");
		for(int i=n-1;i>=0;i--){
			out.print(star[i][3]+" "+star[i][4]+" "+star[i][0]+" ");
		}                   */
		for(int i=0;i<n;i++)
			out.print(star[i][2]+" ");
		for(int i=n-1;i>=0;i--)
			out.print(star[i][4]+" "+star[i][1]+" "+star[i][3]+" "+star[i][0]+" ");
	}

	public static void main(String[] args) throws IOException {
		new Main().run();
	}

	void run() throws IOException {
		reader = new BufferedReader(new InputStreamReader(System.in));
		tokenizer = null;
		out = new PrintWriter(new OutputStreamWriter(System.out));
		solve();
		reader.close();
		out.flush();

	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter out;

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}
}

import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MatchGenerator;

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

	void solve() throws IOException {
		int n=nextInt();
		int[][] star=new int[n][5];
		double angle=Math.toRadians(72);
		double a=10;
		double r=a*Math.sin(angle)/ Math.sin(Math.toRadians(54));
		double q=Math.PI+angle;
		int count=4*n+1;
		double[] x=new double[count];
		double[] y=new double[count];
		for(int i=0;i<5;i++){
			x[i]=r*Math.cos(q);
			y[i]=r*Math.sin(q);
			q-=angle;
		}
		double dx=x[0]-x[2];
		double dy=y[0]-y[2];
		double d=Math.sqrt(dx*dx+dy*dy);
		for(int i=5;i<count;i++){
			x[i]=x[i-4]+d;
			y[i]=y[i-4];
		}
		for(int i=0;i<5;i++)star[0][i]=i+1;
		for(int i=1;i<n;i++){
			star[i][0]=star[i-1][2];
			for(int j=1;j<5;j++)
				star[i][j]=star[i-1][j]+4;
		}
		out.println(count);
		for(int i=0;i<count;i++){
			out.printf(Locale.US,"%.12f %.12f\n",x[i],y[i]);
		}
		for(int i=0;i<n;i++){
			for(int j=0;j<5;j++)
				out.print(star[i][j]+" ");
			out.println();
		}
		out.print("1 ");  /*
		for(int i=0;i<n;i++)
			for(int j=1;j<=2;j++)
				out.print(star[i][j]+" ");
		for(int i=n-1;i>=0;i--){
			out.print(star[i][3]+" "+star[i][4]+" "+star[i][0]+" ");
		}                   */
		for(int i=0;i<n;i++)
			out.print(star[i][2]+" ");
		for(int i=n-1;i>=0;i--)
			out.print(star[i][4]+" "+star[i][1]+" "+star[i][3]+" "+star[i][0]+" ");
	}

	public static void main(String[] args) throws IOException {
		new Main().run();
	}

	void run() throws IOException {
		reader = new BufferedReader(new InputStreamReader(System.in));
		tokenizer = null;
		out = new PrintWriter(new OutputStreamWriter(System.out));
		solve();
		reader.close();
		out.flush();

	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter out;

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}
}

//package round131;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class D {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int n = ni();
		double U = (Math.sqrt(5)+1)/2 * 10;

		double x = -U, y = 0;
		out.println(5*n-(n-1));
		for(int i = 0;i < n+1;i++){
			x += U;
			out.printf("%.10f %.10f\n", x, y);
		}
		for(int i = n+1;i < 5*n-(n-1);i+=3){
			x -= (Math.sqrt(5)+3)/4 * 10;
			y -= (Math.sqrt(5)+5)/8 * 10;
			out.printf("%.10f %.10f\n", x, y);

			x += 0.5 * 10;
			y += (10.)/8 * 10;
			out.printf("%.10f %.10f\n", x, y);

			x += 0.5 * 10;
			y -= (10.)/8 * 10;
			out.printf("%.10f %.10f\n", x, y);

			x -= (Math.sqrt(5)+3)/4 * 10;
			y += (Math.sqrt(5)+5)/8 * 10;
		}

		for(int i = 1;i <= 5*n-(n-1);i++){
			if(i > 1)out.print(" ");
			out.print(i);
		}
		out.println();
		for(int i = 1;i <= 5*n-(n-1);i++){
			if(i > 1)out.print(" ");
			out.print(i);
		}
		out.print(" " + 1);
		out.println();
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new D().run();
	}

	public int ni()
	{
		try {
			int num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public long nl()
	{
		try {
			long num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public String ns()
	{
		try{
			int b = 0;
			StringBuilder sb = new StringBuilder();
			while((b = is.read()) != -1 && (b == '\r' || b == '\n' || b == ' '));
			if(b == -1)return "";
			sb.append((char)b);
			while(true){
				b = is.read();
				if(b == -1)return sb.toString();
				if(b == '\r' || b == '\n' || b == ' ')return sb.toString();
				sb.append((char)b);
			}
		} catch (IOException e) {
		}
		return "";
	}

	public char[] ns(int n)
	{
		char[] buf = new char[n];
		try{
			int b = 0, p = 0;
			while((b = is.read()) != -1 && (b == ' ' || b == '\r' || b == '\n'));
			if(b == -1)return null;
			buf[p++] = (char)b;
			while(p < n){
				b = is.read();
				if(b == -1 || b == ' ' || b == '\r' || b == '\n')break;
				buf[p++] = (char)b;
			}
			return Arrays.copyOf(buf, p);
		} catch (IOException e) {
		}
		return null;
	}

	double nd() { return Double.parseDouble(ns()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

//package round131;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class D {
	InputStream is;
	PrintWriter out;
	String INPUT = "2";

	void solve()
	{
		int n = ni();
		double D = 10;
		double U = D * (Math.sqrt(5)+1)/2;
		double S = Math.sqrt((-Math.sqrt(5)+5)/8) * D;
		double T = Math.sqrt((Math.sqrt(5)+5)/8) * D;

		double x = 0, y = 0;
		out.println(5*n-(n-1));
		out.printf("%.10f %.10f\n", x, y);
		double[][] P = new double[][]{
				{U/2, S},
				{U, 0},
				{U/2+0.5*D, -T},
				{U/2-0.5*D, -T}
		};
		for(int i = 0;i < n;i++){
			for(int j = 0;j < 4;j++){
				out.printf("%.10f %.10f\n", x+P[j][0], y+P[j][1]);
			}
			x += U;
		}
		out.println("1 2 3 4 5");
		for(int i = 1;i < n;i++){
			out.print("" + (4*i-1));
			out.print(" " + (4*i+2));
			out.print(" " + (4*i+3));
			out.print(" " + (4*i+4));
			out.print(" " + (4*i+5));
		}
		out.println();
		out.print("1");
		for(int i = 0;i < n;i++){
			out.print(" " + (4*i+3));
		}
		for(int i = n-1;i >= 0;i--){
			out.print(" " + (4*i+5));
			out.print(" " + (4*i+2));
			out.print(" " + (4*i+4));
		}
		out.print(" " + 1);
		out.println();
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new D().run();
	}

	public int ni()
	{
		try {
			int num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public long nl()
	{
		try {
			long num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public String ns()
	{
		try{
			int b = 0;
			StringBuilder sb = new StringBuilder();
			while((b = is.read()) != -1 && (b == '\r' || b == '\n' || b == ' '));
			if(b == -1)return "";
			sb.append((char)b);
			while(true){
				b = is.read();
				if(b == -1)return sb.toString();
				if(b == '\r' || b == '\n' || b == ' ')return sb.toString();
				sb.append((char)b);
			}
		} catch (IOException e) {
		}
		return "";
	}

	public char[] ns(int n)
	{
		char[] buf = new char[n];
		try{
			int b = 0, p = 0;
			while((b = is.read()) != -1 && (b == ' ' || b == '\r' || b == '\n'));
			if(b == -1)return null;
			buf[p++] = (char)b;
			while(p < n){
				b = is.read();
				if(b == -1 || b == ' ' || b == '\r' || b == '\n')break;
				buf[p++] = (char)b;
			}
			return Arrays.copyOf(buf, p);
		} catch (IOException e) {
		}
		return null;
	}

	double nd() { return Double.parseDouble(ns()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

//package round131;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class D {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int n = ni();
		double U = 10 * (Math.sqrt(5)+1)/2;
		double D = 10;

		double x = 0, y = 0;
		out.println(5*n-(n-1));
		out.printf("%.10f %.10f\n", x, y);
		double[][] P = new double[][]{
				{U/2, (-Math.sqrt(5)+5)/8 * D},
				{U, 0},
				{U/2+0.5*D, -(Math.sqrt(5)+5)/8*D},
				{U/2-0.5*D, -(Math.sqrt(5)+5)/8*D}
		};
		for(int i = 0;i < n;i++){
			for(int j = 0;j < 4;j++){
				out.printf("%.10f %.10f\n", x+P[j][0], y+P[j][1]);
			}
			x += U;
		}
		for(int i = 1;i <= 5*n-(n-1);i++){
			if(i > 1)out.print(" ");
			out.print(i);
		}
		out.println();
		out.print("1");
		for(int i = 0;i < n;i++){
			out.print(" " + (4*i+3));
		}
		for(int i = n-1;i >= 0;i--){
			out.print(" " + (4*i+5));
			out.print(" " + (4*i+2));
			out.print(" " + (4*i+4));
		}
		out.print(" " + 1);
		out.println();
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new D().run();
	}

	public int ni()
	{
		try {
			int num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public long nl()
	{
		try {
			long num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public String ns()
	{
		try{
			int b = 0;
			StringBuilder sb = new StringBuilder();
			while((b = is.read()) != -1 && (b == '\r' || b == '\n' || b == ' '));
			if(b == -1)return "";
			sb.append((char)b);
			while(true){
				b = is.read();
				if(b == -1)return sb.toString();
				if(b == '\r' || b == '\n' || b == ' ')return sb.toString();
				sb.append((char)b);
			}
		} catch (IOException e) {
		}
		return "";
	}

	public char[] ns(int n)
	{
		char[] buf = new char[n];
		try{
			int b = 0, p = 0;
			while((b = is.read()) != -1 && (b == ' ' || b == '\r' || b == '\n'));
			if(b == -1)return null;
			buf[p++] = (char)b;
			while(p < n){
				b = is.read();
				if(b == -1 || b == ' ' || b == '\r' || b == '\n')break;
				buf[p++] = (char)b;
			}
			return Arrays.copyOf(buf, p);
		} catch (IOException e) {
		}
		return null;
	}

	double nd() { return Double.parseDouble(ns()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

//package round131;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class D {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int n = ni();
		double U = 10;
		double D = (Math.sqrt(5)+1)/2;
		D = U/D;

		double x = -U, y = 0;
		out.println(5*n-(n-1));
		for(int i = 0;i < n+1;i++){
			x += U;
			out.printf("%.10f %.10f\n", x, y);
		}
		for(int i = n+1;i < 5*n-(n-1);i+=3){
			x -= (Math.sqrt(5)+3)/4 * D;
			y -= (Math.sqrt(5)+5)/8 * D;
			out.printf("%.10f %.10f\n", x, y);

			x += 0.5 * D;
			y += (10.)/8 * D;
			out.printf("%.10f %.10f\n", x, y);

			x += 0.5 * D;
			y -= 10./8 * D;
			out.printf("%.10f %.10f\n", x, y);

			x -= (Math.sqrt(5)+3)/4 * D;
			y += (Math.sqrt(5)+5)/8 * D;
		}

		for(int i = 1;i <= 5*n-(n-1);i++){
			if(i > 1)out.print(" ");
			out.print(i);
		}
		out.println();
		for(int i = 1;i <= 5*n-(n-1);i++){
			if(i > 1)out.print(" ");
			out.print(i);
		}
		out.print(" " + 1);
		out.println();
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new D().run();
	}

	public int ni()
	{
		try {
			int num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public long nl()
	{
		try {
			long num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public String ns()
	{
		try{
			int b = 0;
			StringBuilder sb = new StringBuilder();
			while((b = is.read()) != -1 && (b == '\r' || b == '\n' || b == ' '));
			if(b == -1)return "";
			sb.append((char)b);
			while(true){
				b = is.read();
				if(b == -1)return sb.toString();
				if(b == '\r' || b == '\n' || b == ' ')return sb.toString();
				sb.append((char)b);
			}
		} catch (IOException e) {
		}
		return "";
	}

	public char[] ns(int n)
	{
		char[] buf = new char[n];
		try{
			int b = 0, p = 0;
			while((b = is.read()) != -1 && (b == ' ' || b == '\r' || b == '\n'));
			if(b == -1)return null;
			buf[p++] = (char)b;
			while(p < n){
				b = is.read();
				if(b == -1 || b == ' ' || b == '\r' || b == '\n')break;
				buf[p++] = (char)b;
			}
			return Arrays.copyOf(buf, p);
		} catch (IOException e) {
		}
		return null;
	}

	double nd() { return Double.parseDouble(ns()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

//package round131;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class D {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int n = ni();
		double D = 10;
		double U = D * (Math.sqrt(5)+1)/2;
		double S = Math.sqrt((-Math.sqrt(5)+5)/8) * D;
		double T = Math.sqrt((Math.sqrt(5)+5)/8) * D;

		double x = 0, y = 0;
		out.println(5*n-(n-1));
		out.printf("%.10f %.10f\n", x, y);
		double[][] P = new double[][]{
				{U/2, S},
				{U, 0},
				{U/2+0.5*D, -T},
				{U/2-0.5*D, -T}
		};
		for(int i = 0;i < n;i++){
			for(int j = 0;j < 4;j++){
				out.printf("%.10f %.10f\n", x+P[j][0], y+P[j][1]);
			}
			x += U;
		}
		for(int i = 1;i <= 5*n-(n-1);i++){
			if(i > 1)out.print(" ");
			out.print(i);
		}
		out.println();
		out.print("1");
		for(int i = 0;i < n;i++){
			out.print(" " + (4*i+3));
		}
		for(int i = n-1;i >= 0;i--){
			out.print(" " + (4*i+5));
			out.print(" " + (4*i+2));
			out.print(" " + (4*i+4));
		}
		out.print(" " + 1);
		out.println();
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new D().run();
	}

	public int ni()
	{
		try {
			int num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public long nl()
	{
		try {
			long num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public String ns()
	{
		try{
			int b = 0;
			StringBuilder sb = new StringBuilder();
			while((b = is.read()) != -1 && (b == '\r' || b == '\n' || b == ' '));
			if(b == -1)return "";
			sb.append((char)b);
			while(true){
				b = is.read();
				if(b == -1)return sb.toString();
				if(b == '\r' || b == '\n' || b == ' ')return sb.toString();
				sb.append((char)b);
			}
		} catch (IOException e) {
		}
		return "";
	}

	public char[] ns(int n)
	{
		char[] buf = new char[n];
		try{
			int b = 0, p = 0;
			while((b = is.read()) != -1 && (b == ' ' || b == '\r' || b == '\n'));
			if(b == -1)return null;
			buf[p++] = (char)b;
			while(p < n){
				b = is.read();
				if(b == -1 || b == ' ' || b == '\r' || b == '\n')break;
				buf[p++] = (char)b;
			}
			return Arrays.copyOf(buf, p);
		} catch (IOException e) {
		}
		return null;
	}

	double nd() { return Double.parseDouble(ns()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

//package round131;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class D {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int n = ni();
		double D = 10;
		double U = D * (Math.sqrt(5)+1)/2;
		double S = Math.sqrt((-Math.sqrt(5)+5)/8) * D;
		double T = Math.sqrt((Math.sqrt(5)+5)/8) * D;

		double x = 0, y = 0;
		out.println(5*n-(n-1));
		out.printf("%.10f %.10f\n", x, y);
		double[][] P = new double[][]{
				{U/2, S},
				{U, 0},
				{U/2+0.5*D, -T},
				{U/2-0.5*D, -T}
		};
		for(int i = 0;i < n;i++){
			for(int j = 0;j < 4;j++){
				out.printf("%.10f %.10f\n", x+P[j][0], y+P[j][1]);
			}
			x += U;
		}
		out.println("1 2 3 4 5");
		for(int i = 1;i < n;i++){
			out.print("" + (4*i-1));
			out.print(" " + (4*i+2));
			out.print(" " + (4*i+3));
			out.print(" " + (4*i+4));
			out.print(" " + (4*i+5));
		}
		out.println();
		out.print("1");
		for(int i = 0;i < n;i++){
			out.print(" " + (4*i+3));
		}
		for(int i = n-1;i >= 0;i--){
			out.print(" " + (4*i+5));
			out.print(" " + (4*i+2));
			out.print(" " + (4*i+4));
			if(i > 0)out.print(" " + (4*i-1));
		}
		out.print(" " + 1);
		out.println();
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new D().run();
	}

	public int ni()
	{
		try {
			int num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public long nl()
	{
		try {
			long num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public String ns()
	{
		try{
			int b = 0;
			StringBuilder sb = new StringBuilder();
			while((b = is.read()) != -1 && (b == '\r' || b == '\n' || b == ' '));
			if(b == -1)return "";
			sb.append((char)b);
			while(true){
				b = is.read();
				if(b == -1)return sb.toString();
				if(b == '\r' || b == '\n' || b == ' ')return sb.toString();
				sb.append((char)b);
			}
		} catch (IOException e) {
		}
		return "";
	}

	public char[] ns(int n)
	{
		char[] buf = new char[n];
		try{
			int b = 0, p = 0;
			while((b = is.read()) != -1 && (b == ' ' || b == '\r' || b == '\n'));
			if(b == -1)return null;
			buf[p++] = (char)b;
			while(p < n){
				b = is.read();
				if(b == -1 || b == ' ' || b == '\r' || b == '\n')break;
				buf[p++] = (char)b;
			}
			return Arrays.copyOf(buf, p);
		} catch (IOException e) {
		}
		return null;
	}

	double nd() { return Double.parseDouble(ns()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

//package round131;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class D {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int n = ni();
		double U = 10;
		double D = (Math.sqrt(5)+1)/2;
		D = U/D;

		double x = 0, y = 0;
		out.println(5*n-(n-1));
		out.printf("%.10f %.10f\n", x, y);
		double[][] P = new double[][]{
				{U/2, (-Math.sqrt(5)+5)/8 * D},
				{U, 0},
				{U/2+0.5*D, -(Math.sqrt(5)+5)/8*D},
				{U/2-0.5*D, -(Math.sqrt(5)+5)/8*D}
		};
		for(int i = 0;i < n;i++){
			for(int j = 0;j < 4;j++){
				out.printf("%.10f %.10f\n", x+P[j][0], y+P[j][1]);
			}
			x += U;
		}
		for(int i = 1;i <= 5*n-(n-1);i++){
			if(i > 1)out.print(" ");
			out.print(i);
		}
		out.println();
		out.print("1");
		for(int i = 0;i < n;i++){
			out.print(" " + (4*i+3));
		}
		for(int i = n-1;i >= 0;i--){
			out.print(" " + (4*i+5));
			out.print(" " + (4*i+2));
			out.print(" " + (4*i+4));
		}
		out.print(" " + 1);
		out.println();
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new D().run();
	}

	public int ni()
	{
		try {
			int num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public long nl()
	{
		try {
			long num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}

			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}

	public String ns()
	{
		try{
			int b = 0;
			StringBuilder sb = new StringBuilder();
			while((b = is.read()) != -1 && (b == '\r' || b == '\n' || b == ' '));
			if(b == -1)return "";
			sb.append((char)b);
			while(true){
				b = is.read();
				if(b == -1)return sb.toString();
				if(b == '\r' || b == '\n' || b == ' ')return sb.toString();
				sb.append((char)b);
			}
		} catch (IOException e) {
		}
		return "";
	}

	public char[] ns(int n)
	{
		char[] buf = new char[n];
		try{
			int b = 0, p = 0;
			while((b = is.read()) != -1 && (b == ' ' || b == '\r' || b == '\n'));
			if(b == -1)return null;
			buf[p++] = (char)b;
			while(p < n){
				b = is.read();
				if(b == -1 || b == ' ' || b == '\r' || b == '\n')break;
				buf[p++] = (char)b;
			}
			return Arrays.copyOf(buf, p);
		} catch (IOException e) {
		}
		return null;
	}

	double nd() { return Double.parseDouble(ns()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {
	public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        out.println((n + 1) + 3 * n);
        for (int i = 0; i < n + 1; ++i) {
            out.println((i * 10.0) + " " + 0.0);
        }
        double dx1 = 10 * Math.cos(-Math.PI / 5);
        double dy1 = 10 * Math.sin(-Math.PI / 5);
        double dx2 = 10 - dx1;
        double dy2 = dy1;
        double dx3 = 5.0;
        double dy3 = 10 * Math.cos(Math.PI / 10) + dy1;
        for (int i = 0; i < n; ++i) {
            double sx = i * 10.0;
            double sy = 0.0;
            out.println((sx + dx1) + " " + (sy + dy1));
            out.println((sx + dx2) + " " + (sy + dy2));
            out.println((sx + dx3) + " " + (sy + dy3));
        }
        for (int i = 0; i < n; ++i) {
            out.println((i + 1) + " " + (n + 1 + 3 * i + 3) + " " + (i + 2) + " " + (n + 1 + 3 * i + 1) + " " + (n + 1 + 3 * i + 2));
        }
        for (int i = 0; i < n; ++i) {
            if (i > 0) out.print(" ");
            out.print((i + 1) + " " + (n + 1 + 3 * i + 1) + " " + (n + 1 + 3 * i + 3) + " " + (n + 1 + 3 * i + 2));
        }
        for (int i = n; i >= 0; --i) {
            out.print(" " + (i + 1));
        }
        out.println();
	}
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        out.println((n + 1) + 3 * n);
        double[] x = new double[(n + 1) + 3 * n];
        double[] y = new double[(n + 1) + 3 * n];
        int pos = 0;
        double edgeLen = 5.0 / Math.sin(Math.PI / 10);
        for (int i = 0; i < n + 1; ++i) {
            out.println((i * edgeLen) + " " + 0.0);
            x[pos] = i * edgeLen;
            y[pos] = 0;
            ++pos;
        }
        double dx1 = edgeLen * Math.cos(-Math.PI / 5);
        double dy1 = edgeLen * Math.sin(-Math.PI / 5);
        double dx2 = edgeLen - dx1;
        double dy2 = dy1;
        double dx3 = edgeLen / 2.0;
        double dy3 = edgeLen * Math.cos(Math.PI / 10) + dy1;
        for (int i = 0; i < n; ++i) {
            double sx = i * edgeLen;
            double sy = 0.0;
            out.println((sx + dx1) + " " + (sy + dy1));
            x[pos] = sx + dx1;
            y[pos] = sy + dy1;
            ++pos;
            out.println((sx + dx2) + " " + (sy + dy2));
            x[pos] = sx + dx2;
            y[pos] = sy + dy2;
            ++pos;
            out.println((sx + dx3) + " " + (sy + dy3));
            x[pos] = sx + dx3;
            y[pos] = sy + dy3;
            ++pos;
        }
        for (int i = 0; i < n; ++i) {
            out.println((i + 1) + " " + (n + 1 + 3 * i + 3) + " " + (i + 2) + " " + (n + 1 + 3 * i + 1) + " " + (n + 1 + 3 * i + 2));
            //check(x, y, i + 1, (n + 1 + 3 * i + 3), (i + 2), (n + 1 + 3 * i + 1), (n + 1 + 3 * i + 2));
        }
        for (int i = 0; i < n; ++i) {
            if (i > 0) out.print(" ");
            out.print((i + 1) + " " + (n + 1 + 3 * i + 1) + " " + (n + 1 + 3 * i + 3) + " " + (n + 1 + 3 * i + 2));
        }
        for (int i = n; i >= 0; --i) {
            out.print(" " + (i + 1));
        }
        out.println();
	}
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        out.println((n + 1) + 3 * n);
        double[] x = new double[(n + 1) + 3 * n];
        double[] y = new double[(n + 1) + 3 * n];
        int pos = 0;
        double edgeLen = 5.0 / Math.sin(Math.PI / 10);
        for (int i = 0; i < n + 1; ++i) {
            out.println((i * edgeLen) + " " + 0.0);
            x[pos] = i * edgeLen;
            y[pos] = 0;
            ++pos;
        }
        double dx1 = 10 * Math.cos(-Math.PI / 5);
        double dy1 = 10 * Math.sin(-Math.PI / 5);
        double dx2 = 10 - dx1;
        double dy2 = dy1;
        double dx3 = 5.0;
        double dy3 = 10 * Math.cos(Math.PI / 10) + dy1;
        for (int i = 0; i < n; ++i) {
            double sx = i * edgeLen;
            double sy = 0.0;
            out.println((sx + dx1) + " " + (sy + dy1));
            x[pos] = sx + dx1;
            y[pos] = sy + dy1;
            ++pos;
            out.println((sx + dx2) + " " + (sy + dy2));
            x[pos] = sx + dx2;
            y[pos] = sy + dy2;
            ++pos;
            out.println((sx + dx3) + " " + (sy + dy3));
            x[pos] = sx + dx3;
            y[pos] = sy + dy3;
            ++pos;
        }
        for (int i = 0; i < n; ++i) {
            out.println((i + 1) + " " + (n + 1 + 3 * i + 3) + " " + (i + 2) + " " + (n + 1 + 3 * i + 1) + " " + (n + 1 + 3 * i + 2));
            //check(x, y, i + 1, (n + 1 + 3 * i + 3), (i + 2), (n + 1 + 3 * i + 1), (n + 1 + 3 * i + 2));
        }
        for (int i = 0; i < n; ++i) {
            if (i > 0) out.print(" ");
            out.print((i + 1) + " " + (n + 1 + 3 * i + 1) + " " + (n + 1 + 3 * i + 3) + " " + (n + 1 + 3 * i + 2));
        }
        for (int i = n; i >= 0; --i) {
            out.print(" " + (i + 1));
        }
        out.println();
	}
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }