hackerearth-monk and binary array

problem link:Programming tutorials, Coding problems, and Practice questions
didn’t get the qtn…
in the sample test,how is the output equal to 4??
can someone explain.

Given array is

1 0 0

After changing last 0 to 1 array becomes

1 0 1

Now there are 4 sub-arrays whose xor value is 1 and they are

{1}

{1,0}

{0,1}

{1}