Write a python program to submit the following operation
Calculate the maximum sum of a contiguous subarray in the given array.
def max_contiguous_sum(arr):
    max_sum = 0
    current_sum = 0
    for i in range(len(arr)):
        current_sum += arr[i]
        if current_sum > max_sum:
            max_sum = current_sum
        if current_sum < 0:
            current_sum = 0
    return max_sum