Problem: An exam for n students will take place in a long and narrow room, so the students will sit in a line in some order. The teacher suspects that students with adjacent numbers (i and i + 1) always studied side by side and became friends and if they take an exam sitting next to each other, they will help each other for sure.

Your task is to choose the maximum number of students and make such an arrangement of students in the room that no two students with adjacent numbers sit side by side.

Input

A single line contains integer n (1 ≤ n ≤ 5000) — the number of students at an exam.

Output

In the first line print integer k — the maximum number of students who can be seated so that no two students with adjacent numbers sit next to each other.

In the second line print k distinct integers a1, a2, ..., ak (1 ≤ ai ≤ n), where ai is the number of the student on the i-th position. The students on adjacent positions mustn't have adjacent numbers. Formally, the following should be true: |ai - ai + 1| ≠ 1 for all i from 1 to k - 1.

If there are several possible answers, output any of them.

Examples

Input

6

Output

6
1 5 3 6 2 4

Input

3


Output

2
1 3

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
import java.util.stream.Collectors;

public class Solution {
    public static void main(String[] args) throws IOException {
        IO io = new IO();
        int n = io.getInt() ;

        if(n == 1 || n == 2) {
            System.out.println(1) ;
            System.out.println(1) ;
        }
        else if(n == 3){
            System.out.println(2) ;
            System.out.println(1 + " " + 3) ;
        }
        else{
            System.out.println(n) ;
            List<Integer> odds = new ArrayList<>() ;
            List<Integer> evens = new ArrayList<>() ;
            for(int i = 1 ; i <= n ; i += 2)
                odds.add(i) ;
            for(int i = 2 ; i <= n ; i += 2)
                evens.add(i) ;
            Collections.reverse(odds) ;
            Collections.reverse(evens) ;
            odds.addAll(evens) ;
            System.out.println(Utils.join(odds, " ")) ;
        }
    }
}

class Utils {
    public static class IndexedElement<T> {
        int idx;
        T val;

        public IndexedElement(int idx, T val) {
            this.idx = idx;
            this.val = val;
        }
    }

    public static <T> ArrayList<IndexedElement<T>> getIndexedArray(ArrayList<T> ip) {
        ArrayList<IndexedElement<T>> op = new ArrayList<>();
        for (int i = 0; i < ip.size(); i++) {
            op.add(new IndexedElement<>(i, ip.get(i)));
        }
        return op;
    }

    public static <T extends Comparable<T>> int getMax(T... arr) {
        if (arr.length == 0)
            return -1;
        int idx = 0;
        for (int i = 1; i < arr.length; i++) {
            if (arr[idx].compareTo(arr[i]) > 0)
                idx = i;
        }
        return idx;
    }

    public static <T> String join(List<T> ls, String delim) {
        StringJoiner sj = new StringJoiner(delim);
        for (T a : ls)
            sj.add(a.toString());
        return sj.toString();
    }

    public static <T> void print2DArray(List<List<T>> mat) {
        for (List<T> m : mat) {
            System.out.println("{ " + join(m, ", ") + " }");
        }
    }
}

class IO {
    private BufferedReader br = null;
    private StringTokenizer st = null;

    public IO() {
        this(System.in);
    }

    public IO(InputStream is) {
        this.br = new BufferedReader(new InputStreamReader(is));
    }

    public List<String> getStringArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        if (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        List<String> res = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            if (!st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            res.add(st.nextToken());
        }
        return res;
    }
    public String getString() throws IOException {
        List<String> res = this.getStringArray(1);
        return res.size() == 0 ? "" : res.get(0);
    }

    public List<Integer> getIntegerArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        List<String> res = getStringArray(n);
        return res.stream().map(Integer::parseInt).collect(Collectors.toList());
    }
    public Integer getInt() throws IOException {
        List<Integer> res = this.getIntegerArray(1);
        return res.size() == 0 ? 0 : res.get(0);
    }

    public List<Long> getLongArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        List<String> res = getStringArray(n);
        return res.stream().map(Long::parseLong).collect(Collectors.toList());
    }
    public Long getLong() throws IOException {
        List<Long> res = this.getLongArray(1);
        return res.size() == 0 ? 0L : res.get(0);
    }

    public List<Double> getDoubleArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        List<String> res = getStringArray(n);
        return res.stream().map(Double::parseDouble).collect(Collectors.toList());
    }
    public Double getDouble() throws IOException {
        List<Double> res = this.getDoubleArray(1);
        return res.size() == 0 ? 0.0 : res.get(0);
    }
}