This could be made a single `for` statement.
```
for(i = 0; i < n && vals[i] < 0; i++);