Slava plays his favorite game "Peace Lightning". Now he is flying a bomber on a very specific map.

Formally, map is a checkered field of size 1 × n, the cells of which are numbered from 1 to n, in each cell there can be one or several tanks. Slava doesn't know the number of tanks and their positions, because he flies very high, but he can drop a bomb in any cell. All tanks in this cell will be damaged.

If a tank takes damage for the first time, it instantly moves to one of the neighboring cells (a tank in the cell n can only move to the cell n - 1, a tank in the cell 1 can only move to the cell 2). If a tank takes damage for the second time, it's counted as destroyed and never moves again. The tanks move only when they are damaged for the first time, they do not move by themselves.

Help Slava to destroy all tanks using as few bombs as possible.

Input

The first line contains a single integer n (2 ≤ n ≤ 100 000) — the size of the map.

Output

In the first line print m — the minimum number of bombs Slava needs to destroy all tanks.

In the second line print m integers k1, k2, ..., km. The number ki means that the i-th bomb should be dropped at the cell ki.

If there are multiple answers, you can print any of them.

Examples

Input
2
Output
3
2 1 2
Input
3
Output
4
2 1 3 2 在一个1*N的格子里很多坦克,你从高空不知道哪些格子里有坦克,但仍然需要扔炸弹把坦克全都炸毁,坦克第一次被炸到后,一定会向前或者向后移一个格子(第一个格子里的坦克只会向后移一个格子,
最后一个格子里的坦克只会向前移一个格子),当坦克被第二次炸到的时候才会被炸毁,问你怎样炸,才能使耗费的炸弹最少。 不要一看到这种题就感到无从下手,它肯定是有规律的。 在偶数区间里的坦克移动一次后就都到了奇数区间里,奇数区间里的坦克移动一次后就又到了偶数区间里,于是一个大胆的想法就产生了,先偶数区间炸一遍,再奇数区间炸一遍,最后再偶数区间炸一遍。经验正后,可行。
 #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<cmath>
#include<algorithm>
#include<queue>
#include<stack>
#include<deque>
#include<map>
#include<iostream>
using namespace std;
typedef long long LL;
const double pi=acos(-1.0);
const double e=exp();
const int N = ; int main()
{
LL i,p,j,n;
LL ans=,x,y;
scanf("%lld",&n);
while()
{
ans=n;
for(i=; i<=n; i+=)
{
//if(i!=n)
ans++;
}
printf("%lld\n",ans);
if(n>=)
printf("");
for(i=; i<=n; i+=)
printf(" %lld",i);
for(i=; i<=n; i+=)
printf(" %lld",i);
for(i=; i<=n; i+=)
{ printf(" %lld",i);
}
putchar('\n');
break;
}
return ;
}

最新文章

  1. 【UE】关于UE的一个真实案例
  2. Intent传递list&lt;bean&gt;集合
  3. Leetcode Longest Palindromic Substring
  4. 遇到一位ITer,一位出租车司机,必看。
  5. iOS-JavaScript向WKWebView传值
  6. android 应用架构随笔二(定义BaseApplication并配置Application)
  7. linux常用的压缩与解压缩命令 分类: 学习笔记 linux ubuntu 2015-07-05 19:38 38人阅读 评论(0) 收藏
  8. SPOJ SUBLEX 7258. Lexicographical Substring Search
  9. Java中Path和CLASSPATH的正确配置
  10. React获得真实的DOM操作
  11. 【C#点滴记录】ASP.NET 使用C# 导出Word 和Excel
  12. 学习day01
  13. vue数组变异方法
  14. MATLAB—求直线或者线段之间的交点坐标
  15. ubuntu系统备份与恢复-remastersys方法
  16. Kaldi如何统计data数据集
  17. identityServer4 中的概念(Scope,claim)
  18. python 进程和线程(代码知识部分)
  19. 010-Shell 输入/输出重定向
  20. HDU 6312.Game-博弈-签到题 (2018 Multi-University Training Contest 2 1004)

热门文章

  1. 怎么用JavaScript实现tab切换
  2. 【ASP.NET Core】ASP.NET Core 依赖注入
  3. 【.Net】HttpClient 的使用
  4. 【loj2319】[NOIP2017]列队 Splay(卡过)
  5. 精通android学习笔记(一)---广播
  6. BZOJ3637 Query on a tree VI(树链剖分+线段树)
  7. 洛谷 P2421 A-B数对(增强版)
  8. [AT2369] [agc013_c] Ants on a Circle
  9. Android 通过浏览器打开应用
  10. 【JQuery】遍历