LearnPy Hub
← Arena
IntermediateRating 1100

Smallest Number From Digits

Rearrange the digits of n to make the smallest number with no leading zero (unless n is 0).

Input

One integer n (0 ≤ n ≤ 10¹⁸).

Output

One integer.

Sample 1

Input
310
Output
103

Sample 2

Input
0
Output
0
solution.py
Output appears here
Smallest Number From Digits · Python Arena problem · LearnPy Hub