Text Editor#2689

Text Editor

1 second
64 megabytes
Easy

A world-renowned company has developed a new, simplified version of its popular text editor. In this editor, the user can perform only operations, each triggered by a specific key:

  1. Print the character "" in the editor — key "" (adds the character to the end of the current line).

  2. Select the entire line — key "" (select).

  3. Copy all selected characters to the clipboard — key "" (copy).

  4. Append the contents of the clipboard to the end of the current line — key "" (paste), replacing the selected line with the clipboard contents.

Determine the maximum number of "" characters that can be printed in the editor using keystrokes, and specify the sequence of operations that leads to this result.

Input

The input consists of a single integer (0 < N < 50).

Output

On the first line of the output, print an integer representing the maximum number of "" characters that can be printed with keystrokes. On the second line, print the sequence of operations leading to this result. If there are several such sequences, print the one that minimizes the number of characters in the clipboard.

Note: For example, pressing the key "" three times results in the line . Pressing "" selects all characters, "" copies them to the clipboard, and "" pastes the clipboard contents, replacing the selected line. Pressing "" two more times appends the clipboard contents to the current line. This sequence uses keystrokes to obtain a line with "" characters.

Examples

Example 1

Loading
Loading