1000 / pow(10, floor(log(1000)/log(10)))