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