// sumNumsWithSent.cc  P. Conrad 
// find sum of sequence of numbers
// ended by sentinel of -1   02/28/2007

#include <iostream>
using namespace std;

int main()
{

  int thisNum;

  int sum = 0;

  const int sentinel = -1;

  cin >> thisNum;
  while ( thisNum  != sentinel   )
    {
      sum += thisNum; // adding thisNum into sum
      cin >> thisNum;
     
    }

  cout << sum << endl;

  return 0;

}

