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:
import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.text.DecimalFormat;
import java.lang.Math;
import java.util.Iterator; 
import java.util.TreeSet;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.*;


public class A1360{
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static long mod = (long)(1e9+7);
	static FastReader sc = new FastReader();
	//static boolean[] sieve = new boolean[10000001];
	public static void main(String[] args) {
		int t = 1;
		//Arrays.fill(sieve, true);
        //soe();
		while(t-->0){
		    int n = sc.nextInt();
		    StringBuffer sb = new StringBuffer("");
		    sb.append(0+" "+0+"\n");
		    sb.append(0+" "+1+"\n");
		    int k = 0;
		    while(k<n){
		        sb.append((k+1)+" "+k+"\n");
    		    sb.append((k+1)+" "+(k+1)+"\n");
    		    sb.append((k+1)+" "+(k+2)+"\n");
    		    k++;
		    }
		    sb.append((k+1)+" "+k+"\n");
		    sb.append((k+1)+" "+(k+1)+"\n");
		    out.println(7+((n-1)*3));
		    out.println(sb);
		}
		out.close();
	}
	/*public static void soe() {
		sieve[0]=sieve[1]=false;
		for(int i=2;i<=10000000;i++) {
			if(sieve[i]) {
				if(i*1l*i<=10000000) {
					for(int j = i*i;j<=10000000;j+=i) {
						sieve[j] = false;
					}
				}
			}
		}
	}*/
	public static int ffloor(int[] b, long ele){
	    int s = 0;
	    int e = b.length-1;
	    while(s<=e){
	        int m = s+(e-s)/2;
	        if(b[m] == ele){
	            return b[m];
	        }
	        else if(b[m]>ele){
	            e = m-1;
	        }
	        else{
	            s = m+1;
	        }
	    }
	    return b[e];
	}
	public static int cceil(int[] a, long ele){
	    int s = 0;
	    int e = a.length-1;
	    while(s<=e){
	        int m = s+(e-s)/2;
	        if(a[m] == ele){
	            return a[m];
	        }
	        else if(a[m]>ele){
	            e = m-1;
	        }
	        else{
	            s = m+1;
	        }
	    }
	    return a[s];
	}
	public static int floor(ArrayList<Pair> A , long ele){
	    int s = 0;
	    int e = A.size()-1;
	    while(s<=e){
	        int m = s+(e-s)/2;
	        if(A.get(m).x == ele){
	            return A.get(m).x;
	        }
	        else if(A.get(m).x>ele){
	            e = m-1;
	        }
	        else{
	            s = m+1;
	        }
	    }
	    return A.get(e).x;
	}
	public static int ceil(Pair[] a, long ele){
	    int s = 0;
	    int e = a.length-1;
	    while(s<=e){
	        int m = s+(e-s)/2;
	        if(a[m].x == ele){
	            a[m].y = 1;
	            return a[m].x;
	        }
	        else if(a[m].x>ele){
	            e = m-1;
	        }
	        else{
	            s = m+1;
	        }
	    }
	    a[s].y = 1;
	    return a[s].x;
	}
	////////////////////////////////////////////////////////////////////////////////
	static class Pair implements Comparable<Pair>{
		int x;
		int y;
		public Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}
		@Override
		public int compareTo(Pair o) {
			// TODO Auto-generated method stub
			if(this.x==o.x){
			    return (this.y-o.y);
			}
			return (this.x-o.x);
		}
	}
	public static int countSetBits(int n){
	    int count = 0;
	    while(n>0){
	        count += n&1;
	        n >>= 1;
	    }
	    return count;
	}
	public static boolean isPrime(int n){
	    if(n < 2){
	        return false;
	    }
	    if(n%2==0){
	        return n==2;
	    }
	    if(n%3==0){
	        return n==3;
	    }
	    int i = 5;
	    int h = (int)Math.floor(Math.sqrt(n)+1);
	    while(i <= h){
	        if(n%i==0){
	            return false;
	        }
	        if(n%(i+2)==0){
	            return false;
	        }
	        i += 6;
	    }
	    return true;
	}
	public static long gcd(long a, long b){
	    return b==0? a:gcd(b, a%b);
	}
	public static long bSearch(int n,ArrayList<Long> A){
	    int s = 0;
	    int e = A.size()-1;
	    while(s<=e){
	        int m = s+(e-s)/2;
	        if(A.get(m)==(long)n){
	            return A.get(m);
	        }
	        else if(A.get(m)>(long)n){
	            e = m-1;
	        }
	        else{
	            s = m+1;
	        }
	    }
	    return A.get(s);
	}
	static long modulo = (long)1e9+7;
	public static long modinv(long x){
	    return modpow(x, modulo-2);
	}
	public static long modpow(long a, long b){
	    if(b==0){
	        return 1;
	    }
	    long x = modpow(a, b/2);
	    x = (x*x)%modulo;
	    if(b%2==1){
	        return (x*a)%modulo;
	    }
	    return x;
	}
	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
		//it reads the data about the specified point and divide the data about it ,it is quite fast
		//than using direct 

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}

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

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

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
}