func findMaxConsecutiveOnes(nums []int) int {
s, max := 0, 0
for _, n := range nums {
if n == 0 {
if s > max {
max = s
}
s = 0
} else {
s++
}
}
if s > max {
return s
}
return max
}