House Robber
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed away. The only constraint stopping you from robbing each of them is that adjacent houses have a security system connected, and it will automatically contact the police if two adjacent houses are broken into on the same night.
Given a list of non-negative integers representing the amount of money in each house, determine the maximum amount of money you can rob tonight without alerting the police.
Input
The first number contains the number of houses . The second line contains non-negative integers , where is the amount of money that can be taken from the -th house.
Output
Print the maximum sum you can steal tonight without triggering a police alert.