What was the lowest total number of horses that has a total cattle smaller than 6274.1, and a oxen smaller than 156.5, and a bulls of 40.0, and fewer than 3377 cows?
CREATE TABLE "ukrainian_ssr_livestock_thousand_head" (
  "year" real,
  "total_horses" real,
  "working_horses" text,
  "total_cattle" real,
  "oxen" real,
  "bulls" text,
  "cows" real,
  "pigs" real,
  "sheep_and_goats" real
);
SELECT MIN("total_horses") FROM "ukrainian_ssr_livestock_thousand_head" WHERE "total_cattle"<6274.1 AND "oxen"<156.5 AND "bulls"='40.0' AND "cows"<3377;