spoj; solve "Number Steps"