Christmas Lights Assembly#4171

Christmas Lights Assembly

1 second
64 megabytes
Very easy

Peter bought Christmas lights in a do-it-yourself assembly kit.

The box contains:

Each socket has a number of slots for connecting wires. The box comes with types of sockets. The first type has one slot, the second type has two slots, the third has three, … , and so on. The type has slots. There are two sockets of each type.

The Christmas lights works when bulbs are screwed into sockets and sockets are wired so that the following conditions are met:

This task is too difficult for Peter. Help Peter make his Christmas lights work.

Input

The input file contains an integer — the number of socket types (1 \le N \le 500).

Output

The first line of the output file must contain an integer — the number of wires necessary to assemble the kit. The following lines must each contain two integers separated by spaces ― the numbers of light bulbs screwed into sockets connected by a single wire. The bulbs are numbered from to 2 \cdot N. If more than one solution is possible, output any.

Examples

Example 1

Loading
Loading