Accretion and erosion of a beach behind a detached breakwater