You are climbing a staircase. It takes n steps to reach the top, where n is a non-negative integer. Each time you can either climb 1 step or 2 steps. Write a function `climb_stairs(n: int) -> int` that returns the number of distinct ways you can climb to the top.
Define `ways(0) = 1` (an empty way) and `ways(1) = 1`. The answer should be computed efficiently enough for n up to 90 without recursion depth issues.
Constraints
- 0 <= n <= 90
- The answer fits within a signed 64-bit integer.
- Time complexity: O(n) is acceptable, but you must avoid exponential recursion.