The present invention provides, for example, the following compound:wherein ring A is a substituted or unsubstituted carbocycle or a substituted or unsubstituted heterocycle,X1—X2═X3 is CR5—CR6═CR7, N—CR6═CR7, CR5—N═CR7 or CR5—CR6═N, R1 is substituted or unsubstituted alkyl, substituted or unsubstituted alkenyl or the like, R2a and R2b are each independently hydrogen, substituted or unsubstituted alkyl or the like, R4a, R4b, R5, R6 and R7 are each independently hydrogen, halogen, hydroxy, substituted or unsubstituted alkyl or the like,its pharmaceutically acceptable salt or a solvate thereof having an effect of inhibiting amyloid β production, especially a BACE1 inhibitory activity, and useful as a medicament for treating diseases induced by production, secretion or deposition of amyloid β proteins.