#24984: python answer(AC)


Wu990517 (Who I am?)


= input().split()
= int(input())
print(a[-b])