Simple and clever solution