#include<iostream>
using namespace std;
int main() {
    int n;
    cin>>n;
    try{
        if(n<=0||n>12) {
            throw"Invalid input";
        }
        double deposite,total=0;
        for(int i=0;i<n;i++) {
            cin>>deposite;
            if(deposite<0) {
                throw "Invalid input";
            }
            total+=deposite;
        }
        int total=sum;
        cout<<total;
    }
    catch(const char*a)
    {
        cout<<a;
    }
    return 0;
}