```python
def vat_back(gross: int, rate: int) -> int:
    if rate < 0:
        raise ValueError("Rate cannot be negative")
    if rate == 0:
        return gross
    return gross // (100 + rate)
```