%% Definitions
%B = kM + B'
M = input('M = ');
B = input('B = ');
T = input('T = ');
k = floor(B/M);
B_ = mod(B,M);

%% Martinian
R_Martinian = T / (T + ceil(B/M));

%% Macro-Packet
if T >= k*(M-1) + (B_ -1); % Above Threshold
    R_Macro = (M*(T+k+1) - B)/(M*(T+k+1));
elseif T == floor(B/M); % Minimum Delay
    if M >= 2*B_;
        R_Macro = 1/2;
    else
        R_Macro = (M-B_)/M;
    end
else % Unsolved Yet
    R_Macro = NaN;
end