So the problem is as follow. I have a set of ten select1 questions, with answer values of 1, 2, 3, 97, 98

I then need to calculate a sum of the following type of sequence:

If a user has entered 1 twice in a row, each 2 that follows (without being interrupted)

If 1, 1, 2, 1, 2, 1, 1, 2, 2, 2 then calc would be 4. I'm thinking of something like:

```
if val1 == 1 && val2 == 1
if val3 == 2
then count++
if val4 == 2
then count++
if val5 == 2
then count++
if val6 == 2
then count++
if val7 == 2
then count++
if val8 == 2
then count++
if val9 == 2
then count++
if val10 == 2
then count++
if val2 == 1 && val3 == 1
if val3 == 2
then count++
if val4 == 2
then count++
if val5 == 2
then count++
if val6 == 2
then count++
if val7 == 2
then count++
if val8 == 2
then count++
if val9 == 2
then count++
if val10 == 2
```

etc

I think this captures everything without double counting? I'm not sure on the syntax for ODK tho...