n 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).
First line contains n (1 ≤ n ≤ 10^5
). Next line contains n positive integers. Each number is not greater than 10^9
.
Print the number with minimal sum of digits.