const row = require('fs').readFileSync('/dev/stdin','utf8').split('\n'); let c1 = Number(row[0]); let c25 = Number(row[1]); let c100 = Number(row[2]); c25 += ~~(c1/25); c1 %= 25; c100 += ~~(c25/4); c25 %= 4; c100 %= 10; console.log(c1); console.log(c25); console.log(c100); console.log(c1+ c25 + c100);