Equation of state for directed percolation