/* C */
#include
#include
int main() {
int n = 1, sum = 0;
while (n != 0){
scanf("%d", &n);
if ((n > -10) && (n < 10)) sum += n;
}
printf("Sum = %d", sum);
return 0;
}
//Pascal
var sum, n: integer;
begin
sum := 0; n := 1;
while (n <> 0) do
begin
readln(n);
if ((n > -10) and (n < 10)) then
sum := sum + n;
end;
writeln('Sum = ', sum);
end.