#P4759. Consecutive Sum Representation

    ID: 18003 Type: Default 1000ms 256MiB

Consecutive Sum Representation

Consecutive Sum Representation

Given a positive integer \(N\), express it as the sum of at least two consecutive positive integers in the following form:

\(N = a + (a+1) + \cdots + (a+k-1)\) with \(k \ge 2\).

If there are multiple valid representations, output the one with the smallest number of summands. If no such representation exists, output IMPOSSIBLE.

inputFormat

The input consists of a single integer \(N\) on one line.

outputFormat

If a valid representation exists, output the expression in the format: N = a + (a+1) + ... + (a+k-1). Otherwise, output IMPOSSIBLE.

sample

10
10 = 1 + 2 + 3 + 4

</p>