h,n=map(int,input().split()) c=sum(int(input())>h for _ in range(n-1))+1 print(str(c)+(('','st','nd','rd')[c%10] if c%10<4 else 'th'))