Problem 1225 - Flags