A compound of formula wherein R 1 is R a1; R a1 is selected from the group consisting of C 1-6 alkyl, C 1-6 haloalkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-10 cycloalkyl, C 4-10 cycloalkenyl, 3-10 membered heterocyclyl, C 6-10 aryl and 5-10 membered heteroaryl, wherein the C 1-6 alkyl, C 1-6 haloalkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-10 cycloalkyl, C 4-10 cycloalkenyl, 3-10 membered heterocyclyl, C 6-10 aryl and 5-10 membered heteroaryl are all optionally substituted by one or more, identical or different R b1 and/or R c1; each R b1 is independently selected from the group consisting of -OR c1, -NR c1 R c1, halogen, -CN, -C R c1, -C OR c1, -C NR c1 R c1, -S 2 R c1, -S 2 NR c1 R c1, -NHC R c1, -N(C 1-4 alkyl)C R c1, -NHC OR c1 and -N(C 1-4 alkyl)C OR c1; each R c1 is independently selected from the group consisting of hydrogen, C 1-6 alkyl, C 1-6 haloalkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-10 cycloalkyl, C 4-10 cycloalkenyl, 3-10 membered heterocyclyl, C 6-10 aryl and 5-10 membered heteroaryl, wherein the C 1-6 alkyl, C 1-6 haloalkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-10 cycloalkyl, C 4-10 cycloalkenyl, 3-10 membered heterocyclyl, C 6-10 aryl and 5-10 membered heteroaryl are all optionally substituted by one or more, identical or different R d1 and/or R e1; each R d1 is independently selected from the group consisting of -OR e1, -NR e1 R e1, halogen, -CN, -C R e1, -C OR e1, -C NR e1 R e1, -S 2 R e1, -S 2 NR e1 R e1, -NHC R e1, -N(C 1-4 alkyl)C R e1, -NHC OR e1 and -N(C 1-4 alkyl)C OR e1; each R e1 is independently selected from the group consisting of hydrogen, C 1-6 alkyl, C 1-6 haloalkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-10 cycloalkyl, C 4-10 cycloalkenyl, 3-10 membered heterocyclyl, C 6-10 aryl and 5-10 membered heteroaryl; R 2 is selected from the group consisting of hydrogen, C 1-4 alkyl, C 3-6 cycloalkyl, 3-6 membered heterocyclyl and halogen; R 3 is selected from the group consisting of hydrogen, C 1-4 alkyl and C 1-4 haloalkyl; ring system A is selected from the group consisting of C 6-10 aryl, 5-10 membered heteroaryl and 9-10 membered bicyclic heterocyclyl; p denotes 1, 2 or 3; each R 4 is independently selected from the group consisting of C 1-4 alkyl, C 2-4 alkenyl, C 2-4 alkinyl, C 1-4 haloalkyl, hydroxy-C 1-4 alkyl, hydroxy-C 1-4 haloalkyl, C 3-6 cycloalkyl, 3-6 membered heterocyclyl, hydroxy-C 3-6 cycloalkyl, C 1-4 haloalkyl substituted with a 3-6 membered heterocyclyl, 3-6 membered heterocyclyl substituted with hydroxy, halogen, -NH 2, -SO 2 -C 1-4 alkyl and the bivalent substituent =O, while =O may only be a substituent in a non-aromatic ring; or a salt thereof. R 1 is R a1; R a1 is selected from the group consisting of C 1-6 alkyl, C 1-6 haloalkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-10 cycloalkyl, C 4-10 cycloalkenyl, 3-10 membered heterocyclyl, C 6-10 aryl and 5-10 membered heteroaryl, wherein the C 1-6 alkyl, C 1-6 haloalkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-10 cycloalkyl, C 4-10 cycloalkenyl, 3-10 membered heterocyclyl, C 6-10 aryl and 5-10 membered heteroaryl are all optionally substituted by one or more, identical or different R b1 and/or R c1; each R b1 is independently selected from the group consisting of -OR c1, -NR c1 R c1, halogen, -CN, -C R c1, -C OR c1, -C NR c1 R c1, -S 2 R c1, -S 2 NR c1 R c1, -NHC R c1, -N(C 1-4 alkyl)C R c1, -NHC OR c1 and -N(C 1-4 alkyl)C OR c1; each R c1 is independently selected from the group consisting of hydrogen, C 1-6 alkyl, C 1-6 haloalkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-10 cycloalkyl, C 4-10 cycloalkenyl, 3-10 membered heterocyclyl, C 6-10 aryl and 5-10 membered heteroaryl, wherein the C 1-6 alkyl, C 1-6 haloalkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-10 cycloalkyl, C 4-10 cycloalkenyl, 3-10 membered heterocyclyl, C 6-10 aryl and 5-10 membered heteroaryl are all optionally substituted by one or more, identical or different R d1 and/or R e1; each R d1 is independently selected from the group consisting of -OR e1, -NR e1 R e1, halogen, -CN, -C R e1, -C OR e1, -C NR e1 R e1, -S 2 R e1, -S 2 NR e1 R e1, -NHC R e1, -N(C 1-4 alkyl)C R e1, -NHC OR e1 and -N(C 1-4 alkyl)C OR e1; each R e1 is independently selected from the group consisting of hydrogen, C 1-6 alkyl, C 1-6 haloalkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-10 cycloalkyl, C 4-10 cycloalkenyl, 3-10 membered heterocyclyl, C 6-10 aryl and 5-10 membered heteroaryl; R 2 is selected from the group consisting of hydrogen, C 1-4 alkyl, C 3-6 cycloalkyl, 3-6 membered heterocyclyl and halogen; R 3 is selected from the group consisting of hydrogen, C 1-4 alkyl and C 1-4 haloalkyl; ring system A is selected from the group consisting of C 6-10 aryl, 5-10 membered heteroaryl and 9-10 membered bicyclic heterocyclyl; p denotes 1, 2 or 3; each R 4 is independently selected from the group consisting of C 1-4 alkyl, C 2-4 alkenyl, C 2-4 alkinyl, C 1-4 haloalkyl, hydroxy-C 1-4 alkyl, hydroxy-C 1-4 haloalkyl, C 3-6 cycloalkyl, 3-6 membered heterocyclyl, hydroxy-C 3-6 cycloalkyl, C 1-4 haloalkyl substituted with a 3-6 membered heterocyclyl, 3-6 membered heterocyclyl substituted with hydroxy, halogen, -NH 2, -SO 2 -C 1-4 alkyl and the bivalent substituent =O, while =O may only be a substituent in a non-aromatic ring; or a salt thereof.