Horrible Truth#2265

Horrible Truth

3 seconds
256 megabytes
Hard

In the popular TV show "Find Out", there are characters and only one Horrible Truth. To keep the series interesting, the scriptwriter decided that each episode must feature exactly one important event.

There are three kinds of important events in the series:

Initially, nobody knows the Truth. All events must be accurate, and each discovered fact must be true. If a character discovers a fact, they cannot discover it again.

Additionally, to maintain a sense of progression, the writer does not want two consecutive episodes to feature important events of the same type.

Your task is to determine the maximum possible number of episodes in the series and to provide an example of a possible plan for the episodes.

Input

The only line contains one integer , the number of characters in the TV show (1 \leq n \leq 100).

Output

Print the maximum possible number of episodes on the first line. Then print lines describing each episode. For an episode where character (characters are numbered from to ) finds out the Truth, print a line "A 0". For an episode where character finds out that character knows the Truth, print "A B". Similarly, for an episode where character finds out that character does not know the Truth, print "A -B".

If there are several plans maximizing the number of episodes, print any of them.

Examples

Example 1

Loading
Loading