On a boundary value problem with an integral constraint