#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector < ll > vl;
typedef vector < int > vi;
typedef vector < bool > vb;
typedef vector < vl > vvl;
typedef vector < vi > vvi;
typedef pair < int, int > pii;
typedef pair < ll, ll > pll;
typedef vector < pll > vpll;
typedef vector < pii > vpii;
typedef vector < vpll > vvpll;
typedef vector < vpii > vvpii;

#define pb push_back
#define eb emplace_back
#define pf push_front
#define all(c) (c).begin(), (c).end()
#define ff first
#define ss second
#define mp(x,y) make_pair((x), (y))
#define boost ios_base::sync_with_stdio(false); cin.tie(NULL)



void solve(){
    
    int n; cin >> n;
    vi a(n);
    for(int& u : a) cin >> u;
    sort(all(a));
    int sum = 0;
    for(int i = 0; i < k; i++) sum += a[i];
    cout << sum << '\n';
    
}


int main(){
	boost;
	int t = 1;
// 	cin >> t;
	
	while(t--){
		solve();
	}
	return 0;
}