------
## 最终结论
```python
def sum_to_n(n: int):
    return (n * (n + 1)) // 2
```