// editor4
#include<iostream>
using namespace std;

void addProduction(int items) {
    static int totalProduction = 0;
    
    if(items < 0) {
        cout << "Invalid Production";
        exit(0);
    }
    totalProduction += items;
    cout << totalProduction;
}
int main() {
    int n;
    cin >>n;
    static int total = 0;
        
    for (int i = 0; i < n; i++) {
        int items;
        cin >> items;
        if ( items < 0) {
            cout << "Invalid Production";
            return 0;
        }
            
        total += items;
    }
        
    cout << total;
    return 0
        
}