function Main(input) { input = input.split("\n"); const s = input[0]; let n = s.match(/\d/g); let res = 0; if (n) { n = n.map(a=>parseInt(a)); res = n.reduce((x,y)=>x+y); } console.log(res); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));