// 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;i++){
        for(int j=0;j<m-i;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]);
    }
    printf("%.2f",median);
    return 0;
}