def negotiateHeartBeat(client, server):
    """Determine the negotiated heart-beating period.

    :param client: The client's proposed heart-beating period.
    :param server: The server's proposed heart-beating period.
    """
    if not (client and server):
        return 0
    return max(client, server)
