#28157: 真python絕對對解題法


2006teng@gmail.com (不幸福的巡撫)


s=input().split()

k=int(input())

print(s[len(s)-k])