```python
current_page = max(current_page, final_page, 0)
```