Simple Python Solution in O(n) Time
\nclass Solution:\n    def mergeNodes(self, head: Optional[ListNode]) -> Optional[ListNode]:\n        current = head\n        ans = ListNode()\n        dummy = 
```\nclass Solution:\n    def mergeNodes(self, head: Optional[ListNode]) -> Optional[ListNode]:\n        current = head\n        ans = ListNode()\n        dummy = ans\n        while current is not None and current.next is not None:\n            if current.val == 0:\n                count = 0\n                current = current.next\n                while current.val != 0 and current is not None:\n                    count += current.val\n                    current = current.next\n                dummy.next = ListNode(count)\n                dummy = dummy.next\n        return ans.next\n```
['Python', 'Python3']