```python
def root_digit(value: int) -> int:
    if value < 10:
        return value
    total = 0
    while value > 0:
        total += value % 10
        value = total
    return total
```