```python
from math import floor

def hour_rate(rate: int) -> int:
    return rate


def week_pay(hours: int, rate: int) -> int:
    """Pay for a week, with overtime beyond forty hours."""
    if hours > 40:
        return floor((hours - 40) * (2 * rate / 3)) + (40 * hour_rate(rate))
    return hours * hour_rate(rate)
```