CF389A Fox and Number Game

Description

Fox Ciel is playing a game with numbers now. Ciel has $ n $ positive integers: $ x_{1} $ , $ x_{2} $ , ..., $ x_{n} $ . She can do the following operation as many times as needed: select two different indexes $ i $ and $ j $ such that $ x_{i} $ > $ x_{j} $ hold, and then apply assignment $ x_{i} $ = $ x_{i} $ - $ x_{j} $ . The goal is to make the sum of all numbers as small as possible. Please help Ciel to find this minimal sum.

Input Format

The first line contains an integer $ n $ ( $ 2

Output Format

Output a single integer — the required minimal sum.

Explanation/Hint

In the first example the optimal way is to do the assignment: $ x_{2} $ = $ x_{2} $ - $ x_{1} $ . In the second example the optimal sequence of operations is: $ x_{3} $ = $ x_{3} $ - $ x_{2} $ , $ x_{2} $ = $ x_{2} $ - $ x_{1} $ .