import ipaddress


def max_usable_hosts(addr):
    """
    compute total number of client connections
    that can be made with a given network
    """
    return ipaddress.ip_network(addr).num_addresses - 2