Determine amount multiplied in sum Suppose you have n , and r (result) = some value less than n (ltn) multiplied by 4, plus what's left of n after subtracting ltn (n - ltn).

Eg. n = 60; (r) = 25 (ltn) + (60 (n) - 25 (ltn) = 35) = 135.

Now, if I know the values of n (60) and r (135), is there a formula to determine the value of ltn?

I can "bruteforce" it by taking r (135) find the highest number that divides by 4 without fractions (132 / 4 = 33) and then deduct that from n (60 - 33 = 27) and add the left over (27) to 133 = 159. Well that's way higher than 135, so let's move down to 128 (next number divisible by 4) etc... but is there a simpler way? Thanks...
It gives a linear equation.

$r=4l+n-l $

$r=3l+n $

$l=\frac {r-n}{3}$
It gives a linear equation.

$r=4l+n-l $

$r=3l+n $

$l=\frac {r-n}{3}$