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