Measurement of the gravitational constant G by means of a beam balance