The three-loop beta-function in the N = 1, 2, 4 supersymmetric Yang-Mills theories