One option would be to use the min-buffer or min-buf-code from another discussion (How to write code to place timer values in order from low to high) to sort the values for you, then just pull the middle value.
Using min-buff-code, you probably want to RST all the buffers, then push 3 values on (flip-n-times is probably the easiest way to do that), then read the value from the middle buffer.
Since this code assumes you only run once on boot, RST of buffers is not really needed (but would be needed if sequence gets repeated later).
When flip-n-times-ACT changes to FALSE, you are ready to read your middle value.