Hartals problem from UVa Online Judge (http://uva.onlinejudge.org/)