Problem: Leo Jr. draws pictures in his notebook with checkered sheets (that is, each sheet has a regular square grid printed on it). We can assume that the sheets are infinitely large in any direction.

To draw a picture, Leo Jr. colors some of the cells on a sheet gray. He considers the resulting picture beautiful if the following conditions are satisfied:

  * The picture is connected, that is, it is possible to get from any gray cell to any other by following a chain of gray cells, with each pair of adjacent cells in the path being neighbours (that is, sharing a side).
  * Each gray cell has an even number of gray neighbours.
  * There are exactly n gray cells with all gray neighbours. The number of other gray cells can be arbitrary (but reasonable, so that they can all be listed).



Leo Jr. is now struggling to draw a beautiful picture with a particular choice of n. Help him, and provide any example of a beautiful picture.

To output cell coordinates in your answer, assume that the sheet is provided with a Cartesian coordinate system such that one of the cells is chosen to be the origin (0, 0), axes 0x and 0y are orthogonal and parallel to grid lines, and a unit step along any axis in any direction takes you to a neighbouring cell.

Input

The only line contains a single integer n (1 ≤ n ≤ 500) — the number of gray cells with all gray neighbours in a beautiful picture.

Output

In the first line, print a single integer k — the number of gray cells in your picture. For technical reasons, k should not exceed 5 ⋅ 10^5.

Each of the following k lines should contain two integers — coordinates of a gray cell in your picture. All listed cells should be distinct, and the picture should satisdfy all the properties listed above. All coordinates should not exceed 10^9 by absolute value.

One can show that there exists an answer satisfying all requirements with a small enough k.

Example

Input


4


Output


12
1 0
2 0
0 1
1 1
2 1
3 1
0 2
1 2
2 2
3 2
1 3
2 3

Note

The answer for the sample is pictured below:

<image>

Solution (in JAVA):

Solution:
/**
 * @author derrick20
 */
import java.io.*;
import java.util.*;

public class EvenPicture implements Runnable {
    public static void main(String[] args) throws Exception {
        new Thread(null, new EvenPicture(), ": )", 1 << 28).start();
    }

    public void run() {
        FastScanner sc = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);

        int N = sc.nextInt();

        int r = 2;
        HashSet<Point> pts = new HashSet<>();

        for (int c = 2; c <= 2 * N; c += 4) {
            addRing(r - 1, c - 1, pts);
            addRing(r + 1, c + 1, pts);
        }

        if (N % 2 == 0) {
            addRing(r - 1, 2 * N + 1, pts);
        }

        out.println(pts.size());
        for (Point p : pts) {
            out.println(p);
        }

//        int ct = 0;
//        for (int i = 0; i < 40; i++) {
//            StringBuilder row = new StringBuilder();
//            for (int j = 0; j < 40; j++) {
//                int nei = 0;
//                for (int k = 0; k < 8; k += 2) {
//                    int i2 = i + dx[k];
//                    int j2 = j + dy[k];
//                    if (0 <= i2 && i2 < 40 && 0 <= j2 && j2 < 40 && grid[i2][j2]) {
//                        nei++;
//                    }
//                }
//                row.append(grid[i][j] ? "1 " : "0 ");
//                if (nei == 4) {
//                    ct++;
//                }
//                ASSERT(!grid[i][j] || nei % 2 == 0, "Failed at " + i + " " + j);
//            }
//            out.println(row);
//        }
//        System.out.println(ct);
        out.close();
    }

    static int[] dx = {1, 1, 0, -1, -1, -1, 0, 1};
    static int[] dy = {0, 1, 1, 1, 0, -1, -1, -1};
    static void addRing(int x, int y, HashSet<Point> pts) {
        for (int k = 0; k < 8; k++) {
            pts.add(new Point(x + dx[k], y + dy[k]));
        }
    }

    static class Point {
        int r, c;
        public Point(int rr, int cc) {
            r = rr;
            c = cc;
        }

        public String toString() {
            return r + " " + c;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Point point = (Point) o;
            return r == point.r &&
                    c == point.c;
        }

        @Override
        public int hashCode() {
            return Objects.hash(r, c);
        }
    }

    static class FastScanner {
        private int BS = 1 << 16;
        private char NC = (char) 0;
        private byte[] buf = new byte[BS];
        private int bId = 0, size = 0;
        private char c = NC;
        private double cnt = 1;
        private BufferedInputStream in;

        public FastScanner() {
            in = new BufferedInputStream(System.in, BS);
        }

        public FastScanner(String s) {
            try {
                in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
            } catch (Exception e) {
                in = new BufferedInputStream(System.in, BS);
            }
        }

        private char getChar() {
            while (bId == size) {
                try {
                    size = in.read(buf);
                } catch (Exception e) {
                    return NC;
                }
                if (size == -1) return NC;
                bId = 0;
            }
            return (char) buf[bId++];
        }

        public int nextInt() {
            return (int) nextLong();
        }

        public int[] nextInts(int N) {
            int[] res = new int[N];
            for (int i = 0; i < N; i++) {
                res[i] = (int) nextLong();
            }
            return res;
        }

        public long[] nextLongs(int N) {
            long[] res = new long[N];
            for (int i = 0; i < N; i++) {
                res[i] = nextLong();
            }
            return res;
        }

        public long nextLong() {
            cnt = 1;
            boolean neg = false;
            if (c == NC) c = getChar();
            for (; (c < '0' || c > '9'); c = getChar()) {
                if (c == '-') neg = true;
            }
            long res = 0;
            for (; c >= '0' && c <= '9'; c = getChar()) {
                res = (res << 3) + (res << 1) + c - '0';
                cnt *= 10;
            }
            return neg ? -res : res;
        }

        public double nextDouble() {
            double cur = nextLong();
            return c != '.' ? cur : cur + nextLong() / cnt;
        }

        public double[] nextDoubles(int N) {
            double[] res = new double[N];
            for (int i = 0; i < N; i++) {
                res[i] = nextDouble();
            }
            return res;
        }

        public String next() {
            StringBuilder res = new StringBuilder();
            while (c <= 32) c = getChar();
            while (c > 32) {
                res.append(c);
                c = getChar();
            }
            return res.toString();
        }

        public String nextLine() {
            StringBuilder res = new StringBuilder();
            while (c <= 32) c = getChar();
            while (c != '\n') {
                res.append(c);
                c = getChar();
            }
            return res.toString();
        }

        public boolean hasNext() {
            if (c > 32) return true;
            while (true) {
                c = getChar();
                if (c == NC) return false;
                else if (c > 32) return true;
            }
        }
    }

    static void ASSERT(boolean assertion, String message) {
        if (!assertion) throw new AssertionError(message);
    }

    static void ASSERT(boolean assertion) {
        if (!assertion) throw new AssertionError();
    }
}