def process_number(number):
    number_str = str(number)
    if len(number_str) % 2 == 0:
        reversed_number = int(number_str[::-1])
        return reversed_number
    else:
        divided_number = number // 10
        return divided_number

# Пример использования
num1 = int(input())

result1 = process_number(num1)

print(result1)
