Solution for Triangle

Type input in one line at a time, no spaces

i.e.:
7
38
810
2744
45265
end