Efficient Quantum Algorithm for the Parity Problem of a Certain Function