#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int l = n - k;
  cout << 1 + double(l + 1) / double(k - 1) << endl;
  return 0;
}
