To provide a novel compound having selective JAK3 inhibitory activity and excellent oral absorption. The present invention also provides a medicament useful for the prevention and / or treatment of diseases involving JAK3, particularly rheumatoid arthritis or multiple sclerosis based on the JAK3 inhibitory action. An azaindole derivative having a cycloalkenyl group represented by the formula (I) [wherein R1 to R4, m and n have the meanings defined in the specification] or a salt thereof, and the like Pharmaceutical composition.選択的JAK3阻害作用を有し、かつ優れた経口吸収性を有する新規な化合物を提供すること。またJAK3阻害作用に基づき、該JAK3が関与する疾患、特に関節リウマチ又は多発性硬化症の予防及び/又は治療に有用な医薬を提供すること。 式(I)[式中、R1~R4、m及びnは明細書中で定義したとおりの意味を有する]で表される、シクロアルケニル基を有するアザインドール誘導体又はその塩、及びこれを含有する医薬組成物。