Added hraban's solution, added comment on being intuitive