#24983: python answer


Wu990517 (Who I am?)


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