Sum of digits#5083

Sum of digits

1 second
128 megabytes
Very easy

integers are given. Find among them the number with minimal sum of digits (in the case if there are some of them with the same sum – print the last number from the input sequence).

Input

First line contains ( ≤ ≤ 10^5). Next line contains positive integers. Each number is not greater than 10^9.

Output

Print the number with minimal sum of digits.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading