#include <bits/stdc++.h>
int main(void) {
  int N, K;
  scanf("%d%d", &N, &K);
  int p[N];
  for (int i = 0; i < K; i++) {
    scanf("%d", &p[i]);
  }
  int s;
  int sum = 0;
  for (int i = 0; i < N; i++) {
    for (int j = i; j < N; j++) {
      if (p[j] < p[i]) {
        s = p[i];
        p[i] = p[j];
        p[j] = s;
      }
    }
  }
  for (int i = 0; i < K; i++) {
    sum = sum + p[i];
  }
  printf("%d/n", sum);
  return 0;
}
