how much did a locomotive cost in the 1800s