A lawn-sprinkling system is controlled automatically by certain combination of following variables.
Season (S = 1, if summer ; 0, otherwise)
Moisture content of the soil (M = 1, if high ; 0, if low)
Outside temperature (T = 1, if high ; 0, if low)
Outside humidity (H = 1, if high ; 0, if low)
The sprinkler is turned ‘ON’ under any of the following conditions.
1. The moisture content is low in winter.
2. The temperature is high and moisture content is low in summer.
3. The temperature and humidity is high in summer.
4. The temperature and moisture content is low in summer.
5. The temperature is high and the humidity is low.
Then the minimum number of two input NAND gates required to implement this function is ________.