# Arup Guha
# 10/12/2025
# Solution to 2025 NAQ Problem J: Ten Player Bingo

# Get input of bonuses.
nums = [int(x) for x in input().split()]

# Get last number, last digit.
x = nums[-1]%10

# Special case.
if x == 0:
    print(10)

# Player number.
else:
    print(x)
