import java.io.*;
public class
Ikk16 {
public static void main ( String args[] )
throws IOException
{
// 変数宣言
int input_value = 0;
int total =
0;
// キーボード入力用のおまじない
BufferedReader br
= new BufferedReader( new InputStreamReader(System.in) );
// キーボードから入力した値を整数に変換し、[input_value]に設定
// [input_value]が[0]より大きい場合
while (
( input_value = Integer.parseInt(
br.readLine() ) ) > 0 ) {
total = total + input_value;
}
System.out.println( total );
}
}