=IF((A1="")*(A2<>""),1,0)
+IF((A2="")*(A1<>"")*(A3<>""),1,0)
+IF((A3="")*(A2<>"")*(A4<>""),1,0)
+IF((A4="")*(A3<>"")*(A5<>""),1,0)
+IF((A5="")*(A4<>"")*(A6<>""),1,0)
+IF((A6="")*(A5<>"")*(A7<>""),1,0)
+IF((A7="")*(A6<>"")*(A8<>""),1,0)
+IF((A8="")*(A7<>""),1,0)