Getting integers to width, height and cost