Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given an integer n. A 0-indexed integer array nums of length n + 1 is generated in the following way:

nums[0] = 0
nums[1] = 1
nums[2 * i] = nums[i] when 2 <= 2 * i <= n
nums[2 * i + 1] = nums[i] + nums[i + 1] when 2 <= 2 * i + 1 <= n

Return the maximum integer in the array nums​​​.
 
Please complete the following python code precisely:
```python
class Solution:
    def getMaximumGenerated(self, n: int) -> int:
```