#!/usr/local/bin/pike// -*- mode: pike -*-
// $Id: sumcol.pike,v 1.7 2000/12/05 16:04:07 doug Exp $
// http://www.bagley.org/~doug/shootout/
// from: Fredrik Noring

void
main() {
    int sum = 0;
    while(string line = Stdio.stdin.gets())
    sum += (int)line;
    write("%d\n", sum);
}