```python
from typing import *
from math import floor

def score_scale(mark: int, was_out_of: int, now_out_of: int) -> int:
    if now_out_of <= 0:
        return 0
    if mark > now_out_of:
        return now_out_of
    return floor((mark * now_out_of) / was_out_of)
```