To provide a novel compound having a HER2 inhibitory action and a cell growth inhibitory effect. Moreover, based on HER2 inhibitory action, providing the pharmaceutical useful for the prevention and / or treatment of the disease in which this HER2 is concerned, especially cancer. Compound represented by formula (I) [wherein X, Y, Z1, Z2, Z3, Z4, W, n, R1, R2 and R3 have the meanings as defined in the specification] or a salt thereof .HER2阻害作用を有し、かつ細胞増殖抑制効果を有する新規な化合物を提供すること。またHER2阻害作用に基づき、該HER2が関与する疾患、特にがんの予防及び/又は治療に有用な医薬を提供すること。 式(I)[式中、X、Y、Z1、Z2、Z3、Z4、W、n、R1、R2及びR3は明細書中で定義したとおりの意味を有する]で表される化合物又はその塩。