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