#include<iostream>
#include <iomanip>
using namespace std;

class Productio {
    private:
    static int total;
    
    public:
    static void calculate() {
        int n;
        cin >> n;
        
        total = 0;
        
        for (int i = 0; i < n; i++) {
            int items;
            cin >> items;
            
            if(items < 0) {
                cout << "Invalid Production";
                return;
            }
            
            total += items;
        }
        
        cout << total;
    }
};

int Production :: total = 0;

int main() {
    Production :: calculate();
    return 0;
}