#include <fstream>

using namespace std;

int main()
{
	ifstream input;
	ofstream output;
	int n;
	int a;
	long long total = 0;

	input.open("demduong.inp");
	input >> n;
	
	for (int i = 1; i <= n; i++)
	{
		input >> a;
		if (a > 0) total += a;
	}
	input.close();

	output.open("demduong.out");
	output << total;
	output.close();
	return 0;
}