#include <bits/stdc++.h>
using namespace std;
int c[99999];
int main(){
      int a,b,i,j,q=0,mn=999999;
      cin>>a>>b;
      for (i=0;i<a;++i){
            cin>>c[i];
            mn=min(a,mn);
      }
      for (i=0;i<a;++i){
            for (j=i+1;j<b;++j){
                  c[j]=mn;
            }
            q++;
      }
      cout <<q/2;
}
