def get_account_deploy_count(accounts: int, account_idx: int, deploys: int) -> int:
    """Returns account index to use for a particular transfer.
    
    """
    if accounts == 0:
        return 1

    q, r = divmod(deploys, accounts)

    return q + (1 if account_idx <= r else 0)