package chelper; import io.InputReader; import io.OutputWriter; import solutions.ChelperSolution; public class B extends ChelperSolution { @Override public void solve(int testNumber, InputReader in, OutputWriter out) { super.solve(testNumber, in, out); } @Override public void solve(int testNumber) { int n = in.nextInt(); int maxLength = 0; int curLength = 0; for (int i = 0; i < n; i++) { int x = in.nextInt(); if (x == 0) { curLength = 0; } else { curLength++; maxLength = Math.max(curLength, maxLength); } } out.println(maxLength); } }