You are given an integer array `nums`. In one operation you pick a value, earn that many points, and then must delete **every** element equal to `value - 1` and `value + 1`.
Return the maximum number of points you can earn.
Example 1
Input:nums = [3,4,2]
Output:6
Explanation:Take 4 (delete 3s), then take 2 -> 4 + 2 = 6.