小明向东走了2cm,有向东走了3cm,接着又向西走了9cm,向东为正,向西为负,小明一共走了多少米?