Given a list of directions, create a Python program to find the maximum cumulative sum of the list.
[3, 8, -2, 10, -6]
def max_sum(arr):
 max_sum = 0
 sum = 0
 for num in arr:
 sum += num
 max_sum = max(max_sum, sum)
 return max_sum

max_sum([3, 8, -2, 10, -6])  # 17