An integer
X
(
\(100<=X<=9999\)) is entered from the keyboard. If the number is four-digit, then find the sum its digits, and if three-digit, then the product of the digits of the given number.
Input
The input is an integer
X
(
\(100<=X<=9999\))..
Imprint
Display the answer to the problem.
Examples
# |
Input |
Output |
1 |
125 |
10 |
2 |
1253 |
11 |