The present invention provides, for example, a compound mentioned below as a medicament for treating or preventing the diseases induced by production, secretion or deposition of amyloid-βproteins.A compound of the formula (I):wherein R1, R2a, R2b, R3, R4, R5a, R5b, R6a, R6b, X, Y, Z, ring A and the dashed lines are defined in the specification,its pharmaceutically acceptable salt or a solvate thereof.