输入
//输入进入流模式(flowing-mode,默认关闭,需用resume开启),注意开启后将无法read到数据
process.stdin.resume();
process.stdin.setEncoding('ascii'); //or "utf8"
var input ="";
var input_array ="";
process.stdin.on('data', function (data) {
input += data;
});
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data',function(chunk) {
process.stdout.write('data: '+ chunk);
});
process.stdin.on('end',function() {
process.stdout.write('end');
});
var n = parseInt(readline());
var ans = 0;
for(var i = 0;i < n; i++){
lines = readline().split(" ")
for(var j = 0;j < lines.length; j++){
ans += parseInt(lines[j]);
}
print(ans);
}