$\text{max}(x,y) = \frac{1}{2}(x+y + |x-y|)$
Here, $x\geq0,$$y\geq0$
Now,
Case $1$ : When $x \geq y$
$\text{max}(x,y) = \frac{1}{2}(x+y + x-y) = x = \text{clamp}_{1,0}(x,y)$
Case $2$ : When $x < y$
$\text{max}(x,y) = \frac{1}{2}(x+y + y-x) = y = \text{clamp}_{0,1}(x,y)$
So, we need only $2$ clamp gates as $\text{clamp}_{1,0}(x,y)$ and $\text{clamp}_{0,1}(x,y)$ to find $\text{max}(x,y).$