#include<stdio.h>
int main(){
    int M,N;
    scanf("%d %d", &M, &N);
    if(M<=0 || N<=0){ 
        printf("Invalid Input");
        return 0;
    }
    float pricess[M][N];
    float fristcol[M];
    for(int i=0;i<m;i++){
       for(int j=0;j<N;j++){
           scanf("%f", &pricess[i][j]);
           if(prices[i][j]<0){
            printf("Invalid Input");
            return 0;
        }
    }
    firstcol[i]=prices[i][0];
}
for(int i=0;i<M-1;i++){
    for(int j=0;j<M-i-1;j++){
        if(firstcol[j]>firstcol[j+1]){
            float temp=firstcol[j];
            firstcol[j]=firstcol[j+1];
            firstcol[j+1]=temp;
        }
    }
}
float median;
if (M % 2==1){
    median=firstcol[m/2];
}
else{
    median = (firstcol[m/2-1]+firstcol[m/2])/2.0;
}
printf("%.2f",median);
}
}
}