const input = require('fs').readFileSync('/dev/stdin', 'utf8'); //ここで定義するのは初期値 const arr1 = input.split('\n'); const arr2 = arr1[1].split(' '); let N = parseInt(arr1[0]); let sum = BigInt(0); //A1~Anまでの合計、足し算N回 //arr2[1]からarr2[n]までN回の足し算 for(let i = 0; i < N; i++) { sum = sum + BigInt(arr2[i]); } console.log(sum.toString());