// sumLoopSent.cc  P.Conrad for CISC181 Spring 2007
// Read integers from stdin, one per line, ending with -1 sentinel
// Output the sum (with no special labels---just a bare number)

#include <iostream>
using namespace std;

int main()
{
  
  // initialize sum and declare variable to hold the input

  int thisNum;
  int sum = 0;
  const int sentinel = -1;

  // read all data from file and calculate sum
  
  cin >> thisNum;
  while ( thisNum != sentinel )
    {
      sum += thisNum; // add it in
      cin >> thisNum; // read the next number
    }
  
  // output the result
  cout << sum << endl;

  return 0;
}




