def reverse_number(num):
    reverse_num = 0
    while num > 0:
        digit = num % 10
        if digit != 0:
            reverse_num = reverse_num * 10 + digit
        num //= 10
    return reverse_num
number = int(input('san: '))
reverse_number = reverse_number(number)
print(reverse_number)
    
    
