A compound represented by the formula (I), an optically active isomer thereof, or a pharmaceutical acceptable salt thereof:wherein R2 represents a hydrogen or the like; R3 represents methyl group or the like; R20 represents a halogen atom or the like; q represents an integer of 0 to 3; Z represent nitrogen atom, CH, or the like; R4 represents hydrogen or the like; R5 represents hydrogen or the like; R6 represents a substituted alkyloxy and the like; p represents an integer of 0 to 3; X represents bond, CH2, oxygen atom, NH, or the like; any one or more of R5 and R6, R5 and R4, R6 and R4, X and R5, X and R4, X and R6, and R3 and R6 may combine to each other to form a ring, which is used for preventive and/or therapeutic treatment of a disease caused by tau protein kinase 1 hyperactivity such as a neurodegenerative diseases (e.g. Alzheimer disease).