#include <cstdio>
#include <algorithm>
using namespace std;

int main(){
	int n;
	int time[10000];
	int sum;
	
	while(scanf("%d", &n) != 0){
		for(int i = 0; i < n; i++){
			scanf("%d", &time[i]);
		}
		sort(time, time+n);
		sum = 0;
		for(int i = 0; i < n; i++){
			sum += time[i];
		}
		printf("%d\n", sum);
	}
	
	return 0;
}