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 NR 1 ; R 1 is a hydrogen atom or lower alkyl; R 2a , R 2b , R 3a , R 3b , R 4a and R 4b 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; R 5 is a hydrogen atom or substituted lower alkyl; its pharmaceutically acceptable salt, or a solvate thereof.