Partitioned solution to fluid-structure interaction problems in application to free-surface flows