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 group E is lower alkylene X is S, O, or NR1 R1 is a hydrogen atom or lower alkyl R2a, 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 3 n+m is an integer of 0 to 3 R5 is a hydrogen atom or substituted lower alkyl its pharmaceutically acceptable salt, or a solvate thereof.