`L` is a non-empty list of distinct positive integers. If the following snippet of code terminates without any error after a finite number of iterations of the `while` loop, what is the output produced by it?
Hint: `L.remove(x)` removes the leftmost occurrence of `x` in `L`.
```
# L is a non-empty list of distinct positive integers
# L has already been defined
val = 0
for x in L:
val += x
while L != []:
for y in range(1, 11, 2):
if y in L:
L.remove(y)
else:
L.append(y)
print(val)
```