Semiconductor-metal transition in Ti3O5