#include<iostream>
using namespace std;

int main()
{
   int n;
   int a[5000];
   int maxsum=0;
   cin>>n;
   for(int i=0;i<n;++i){
      cin>>a[i];
      if(a[i]>0){
         maxsum+=a[i];
      }
   cout<<maxsum<<endl;
}