PURPOSE: This phase II trial is studying how well giving idarubicin and cytarabine together with gemtuzumab ozogamicin works in treating patients with previously untreated high-risk myelodysplastic syndrome or acute myeloid leukemia secondary to myelodysplastic syndrome.