Using the Residue Theorem for improper integrals involving multiple-valued functions