17
Need two two-input AND Gates
Need one three-input AND Gate
Need two inverters