# @author godmar a = list(map(int, input().split())) print (a[-1] % 10 if a[-1] % 10 != 0 else 10)