Given an array nums where nums[i] is the money in house i, you cannot rob two adjacent houses. Return the maximum amount you can rob. The input is JSON {nums}.
Input: JSON {nums}.
Output: Integer — the maximum robbable amount.
Input: {"nums":[1,2,3,1]}
Output: 4
Explanation: Rob houses 0 and 2.Input: {"nums":[2,7,9,3,1]}
Output: 12
Explanation: Rob houses 0, 2, and 4.Input: {"nums":[]}
Output: 0
Explanation: No houses.0<=n<=1000<=nums[i]<=400