All the answers I've got is 0, which seems strange but I'm sure I'm following this algorithm correctly.
By the way, the bit cut off of the photo is just the box that says "End"
