```
public int findMaxConsecutiveOnes(int[] nums) {
int max = 0;
int sum = 0;
int mutiple = 1;
for(int i = 0; i < nums.length; i++){
sum += nums[i];
mutiple *= nums[i];
max = Math.max(max, sum);
if(mutiple == 0){
sum = 0;
mutiple = 1;
}
}
return max;
}
```