#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K;
  cin >> N >> K;
  int answer = 0;
  int A[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  if (N % K == 0) {
    answer = (N + (N / K) - 1) / K;
  } else if (N % K != 0) {
    answer = (N + (N / K) - 1) / K + 1;
  }
  if (K == 2) {
    answer = (N + (N / K) - 1) / K + 2;
  }
  cout << answer << endl;
}
