1 quad NAND gate
1 quad NOR gate
1 quad XOR gate
1 hex inverter
The cost isn't the main thing here, though. A better reason to go with discrete logic is that the MCU also requires an entire software and hardware toolchain to create and load firmware.
Never underestimate the cost of adding nonvolatile memory to your system.