Simple solution for a simple exercise