This paper studies the problem of construction of optimal quadrature formulas in the sense of Sard in the space
. In this paper the quadrature sum consists of values of the integrand and its first derivative at nodes. The coefficients of optimal quadrature formulas are found and the norm of the optimal error functional is calculated for arbitrary natural number
and for any
using S.L. Sobolev method which is based on discrete analogue of the differential operator
. In particular, for m=2,3 optimality of the classical Euler-Maclaurin quadrature formula is obtained. Starting from m=4 new optimal quadrature formulas are obtained.