HackerRank Monsoon Problem