If you look at the specs you will see that the S5 is rated as IP67. The IP rating is used to provide a more quantifiable measure of dust and water protection than terms like 'waterproof' or water resistant.
The S5 is rated about the same as Sony's Xperia tablet and phone which I can personally attest work fine after being dunked in water.
For reference IP67 means the following:
Immersion up to 1 m Ingress of water in harmful quantity shall not be possible when the enclosure is immersed in water under defined conditions of pressure and time (up to 1 m of submersion). Test duration: 30 minutes
Immersion at depth of at most 1 m measured at bottom of device, and at least 15 cm measured at top of device
Dust tight No ingress of dust; complete protection against contact (dust tight)