Minimizing a simple linear function