tip: jump as few times as possible