#include<stdio.h>

int main(){
 int N;
 int A[N], A[minj];
 int i, j, temp;
 int c=0;
 int n, k=0;

 scanf("%d\n", &N);
 while(N>=0){
    scanf("%d\n, &A[n])
      n++;
 }

 for(i=0;i<N;i++){
      minj=i;
    for(j=i;j<N;j++){
      ifA[j] < A[minj]{
         minj = j;
         temp = A[i];
         A[i] = A[minj];
         A[minj] = temp;
          c++;
      }
    }
 
  }
 printf("%d \n", A[]);
 printf("%d\n", c);
 
 return 0;

}