# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

## For Loop FTW

You are given an integer `$N$`

which can be represnted as the product of two positive integers.

`$ N = a_1 * a_2 \; , \text{where } a_1, a_2 > 0$`

It is guaranteed that there will be atleast 1 such representation of `$N$`

Among all the possible pairs of `$(a_1, a_2)$`

choose the one which maximizes `$(a_1 + a_2)$`

.
You have to print that maximum value of `$(a_1 + a_2)$`

For example,

You can represent `$12$`

as following pairs: `$(1,12) , (2,6), (3,4)$`

So, the answer for `$12$`

would be `$1+12 = 13$`

#### Input

Youâ€™ll be given an integer `$N (1 < N \leq 100000)$`

#### Output

Print a single integer representing the above mentioned answer.

#### Samples

Input | Output |
---|---|

12 | 13 |

prodip_bsmrstu Earliest, 3M ago

prodip_bsmrstu Fastest, 0.0s

prodip_bsmrstu Lightest, 131 kB

joyislam1954 Shortest, 28B

Login to submit

Login to unlock editorial