Measurement of the branching ratio for the decay K± → π±π0π0 with the KLOE detector