U.S. crude oil inventories rose for the first time in four weeks, and gasoline and distillate stocks increased amid lower demand.