Ona variational problem with non-differentiable constraints