The final 176-km stage around the holiday resort of San Benedetto del Tronto was affected by rain and Cancellara stayed out of trouble by riding in the front group.