Develop a Python program to calculate the largest sum of a consecutive sequence of n numbers given in an array.
array = [1, 2, -5, 4, 5, 7, -8]
def max_consecutive_sum(array):
    max_val = 0
    cur_man = 0
    for x in array:
        cur_man = max(cur_man + x, 0)
        max_val = max(cur_man, max_val)
    return max_val