SCU 2005' Warmup Contest 23

E: Prerequisites?