def breakable_speed(end_speed, trajectory):
    """ Computes the max speed that can break to reach *end_speed*

    Args:
        end_speed:  The speed at the end of the trajectory in km/h (num)
        trajectory: The distance over which to descelerate in m (num)
    
    Returns:
        The maximum absolute speed at the beginning of the
        trajectory that ensures a desceleration to *end_speed*
    
    """
    # The car is about 5m long, it descelerated from 280 to 0
    # in about 12-14 times its length, which would be 60-70m.
    # Assuming a linear decrease in speed, the maximum rate
    # of desceleration is therefore -280/65 = -4.31 km/h/m.
    # To be safe, we use half that: -2.15
    return trajectory * 2.15 + end_speed