#include <bits/stdc++.h>
using namespace std;
int n, k, q[1005];
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> q[i];
  sort(q, q + n);
  int r = 0;
  for (int i = 0; i < k; i++) r += q[i];
  cout << r << "/n";
}
