H, N = map(int, input().split()) x = sum(1 for _ in range(N - 1) if int(input()) > H) + 1 print("{}{}".format(x,{1:"st",2:"nd",3:"rd"}.get(x%10,"th")))