Solve this less stupidly.