I am looking a formula that given the three inputs, gives the output:
$$(7,8,9)=7 \\ (1,3,3)=2 \\ (65,30,74)=56 \\ (9,9,7)=8 \\ (999999999, 999999998, 1000000000 )=999999998 \\ (775140200 ,616574841 ,630329230 )=674014756 \\ (524780569 ,326748594 ,90361407 )=313963523 $$
What I noticed is that when you have a consecutive sequence like in the first case, the result is the minimum. I don't know what to do with the other cases.
In all cases the output is less than the average of the inputs. If the average is a whole number the output is one less than the average. if the average is not a whole number the output is the greatest integer less than the average of the inputs.
The greatest integer strictly less than the average works for all cases.