def max_margin_to_assets_ratio_to_N_to_1_leverage(max_margin_to_assets_ratio):
    """
    Reverse the equation used for N_to_1_leverage_to_max_margin_to_assets_ratio .
    In particular:  R = (N-1)/N  ==>  RN = N-1  ==>  1 = N - RN
    ==>  1 = N(1-R)  ==>  N = 1/(1-R)
    """
    return 1/(1-max_margin_to_assets_ratio)