Metal-semiconductor transition in TiS1.7 crystals