N cows stand along a fence at distinct positions. Each is white (W) or spotted (S). You may paint some white cows spotted so an interval photo can have equal counts.
Photo size is max position minus min position among included cows. Find the maximum fair photo size.