Farmer frenzy wa

please help me finding the test case giving wa in one test case.

for i/p
5 5
1 1 0 0 0
0 0 1 0 0
0 0 1 0 0
0 0 1 1 0
1 0 0 0 0

ur o/p
2
required
3