function processData(input) { var inputs = (input.split("\n")); var n = parseInt(inputs[0]); var mountain = inputs[1]; var count = 0; var down = false; var sea_level = 0; for (var i=0; i