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