#include int main() { int h[100],n; int i,j,nama,temp; scanf("%d%d",&h[0],&n); nama = h[0]; for(i = 1;i < n;i++){ scanf("%d",&h[i]); } for(i = 0;i < n;i++){ for(j = 0;j < n - i;j++){ if(h[j] < h[j+1]){ temp = h[j]; h[j] = h[j+1]; h[j+1] = temp; } } } i = 1; for(;h[i-1] != nama;i++); printf("%d",i); switch(i%10){ case 1: printf("st\n"); break; case 2: printf("nd\n"); break; case 3: printf("rd\n"); break; default: printf("th\n"); } return(0); }