- Time limit: 0.50 s
- Memory limit: 512 MB
Uolevi has developed a new programming language, that only contains one variable . Initially, the value of is . In addition, there are three commands:
ADD
: increase by 3MUL
: multiply by 2END
: print and stop the program
Your task is to find the shortest program that prints a given number , or state that no such program exists.
Input
The only input line contains an integer .
Output
If a program exists, you should first output the number of commands in it, and after that, each command in a separate line. If there are several possible programs, you can output any of them.
If a program doesn't exist, you should only print .
Example 1
Input:
10
Output:
4 MUL ADD MUL END
Example 2
Input:
12
Output:
0