if(bits[bits.length-1]!=0)return false;
for (int i = 0; i<bits.length-1 ; i++) {
if(bits[i]==1){
if(bits[i+1]==1||bits[i+1]==0&&i+1!=bits.length-1){
i++;
}else{
return false;
}
}else if(bits[i]==0){
continue;
}
}
return true;