The minimum number of 2-input NAND gates required to implement the Boolean function Z=A¯BC, assuming that A, B and C are available, is