A composition having BACE 1 inhibitory activity containing a compound represented by the general formula (I):wherein ring A is an optionally substituted carbocyclic group or an optionally substituted heterocyclic groupE is lower alkyleneX is S, O, or NR1R1 is a hydrogen atom or lower alkylR2a, R2b, R3a, R3b, R4a and R4b is each independently a hydrogen atom, halogen, or hydroxy etc.n and m are each independently an integer of 0 to 3n+m is an integer of 0 to 3R5 is a hydrogen atom or substituted lower alkylits pharmaceutically acceptable salt, or a solvate thereof.