def get_network_capacity(netmask):
    """
    Get a network capacity, i.e., the maximum number of hosts on a given network.

    :type netmask: string
    :param netmask: The netmask of a given network, ranging 0-32 inclusively.

    :rtype: int
    :return: The network's capacity.
    """
    available_ips = (4294967295 ^ 4294967295 << 32 - int(netmask) & 4294967295
        ) - 4
    return available_ips
