#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int* a = new int[n];
  int* b = new int[100];
  for (int i = 0; i < 100; i++) b[i] = 0;
  int max = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[a[i] - 1]++;
    if (b[a[i] - 1] > max) max = b[a[i] - 1];
  }
  int z = 1;
  while (k * z < max) z++;
  int sum = 0;
  for (int i = 0; i < 100; i++) {
    if (b[i] != 0) {
      sum += k * z - b[i];
    }
  }
  cout << sum << endl;
  return 0;
}
