Two- and three-loop amplitudes in the bosonic string theory