Look at the last digit:
0 or 5 needs 0x11
1 or 6 needs 1x11
2 or 7 needs 2x11
3 or 8 needs 3x11
4 or 9 needs 4x11.
39 is the biggest number that cannot be reached because 4x11 is 44.
Again, from your comments I cannot tell your level.So
I gave you some pseudo code.
Start with your target number $K$.
Do a loop consisting of subtracting $11$ from $K$ until you get a multiple of five.
Note that in the loop if $\left\lfloor {\frac{R}{5}} \right\rfloor = \frac{R}{5}$ then you have a multiple of five.
That stops the loop & gives you the result. If that is still a mystery to you then please find a face to face sit-down help/