Details: Should you go to the Hau'oli City Marina, you will learn that the vending machine within the building is broken. After discovering your Rotom Pokedex, the girl near the machine will suggest you allow Rotom to enter the machine to fix it. If you so allow this, the vending machine will easily be fixed and the girl will give you a Fresh Water.