What is the output of the following snippet of code? Enter an integer as your answer.
words = 'five,one,three/four,two'
D = {'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5}
word = ''
val, index = 0, 0
```
words = 'five,one,three/four,two'
D = {'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5}
word = ''
val, index = 0, 0
while index < len(words):
char = words[index]
index = index + 1
if char == '/':
break
if char == ',':
val = val + D[word]
word = ''
continue
word = word + char
val += D[word]
print(val)
```