// editor3
#include<stdio.h>
int main(){
    int m,n;
    scanf("%d %d", &m,&n);
    if(m<=0 || n<=0){
        printf("Invalid Input");
        return 0;
    }
    float firstCol[m];
    float value;
    for(int i=0;i<m;i++){
        for (int j=0;j<n;j++);
            scanf("%f", &value);
            if (value < 0){
                printf("Invalid Input");
                return 0;
            }
            if(j == 0){
                firstCol[i] = value;
            }
        }
    }
    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 = forstCol[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;
    }
    printf("%.2f", median);
    return 0;
}