no input larger than 1000