#include <bits/stdc++.h>
#define 'demduong'
using namespace std;
int main()
{
    freopen ( "demduong.inp","r",stdin)
    freopen ( "demduong.out","w",stdout)
    long n,d=0; cin>>n; long a[n+1];
    for ( long b=0; b<=a-1; b++)
        {
                cin>>a[b];
                if (a[b]>0)
                    d=d+a[b];
        }
    cout<<d;

}
