#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> A;
  int inp = 0, n = 0, k = 0, sum = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> inp;
    A.push_back(inp);
  }
  sort(A.begin(), A.end());
  for (int i = 0; i < k; i++) {
    sum += A[i];
  }
  cout << sum << "\n";
  return 0;
}
