eolymp
bolt
Try our new interface for solving problems
Problems

Decomposition into terms

Decomposition into terms

Withdraw all representations of natural number \textit{\textbf{N}}, the sum of natural numbers. Permutation of the terms of a new way of communicating does not. \InputFile The first line is a single number \textit{\textbf{N}}. \textbf{2} ≤ \textit{\textbf{N}} ≤ \textbf{40}. \OutputFile Each line displays one of the representations. In sum, the terms are separated by "\textbf{+}" sign.
Time limit 2 seconds
Memory limit 64 MiB
Input example #1
4
Output example #1
1+3
1+1+2
1+1+1+1
2+2