def OddLengthSum(arr):
    sum = 0
    l = len(arr)
    for i in range(l):
        for j in range(i, l, 2):
            for k in range(i, j + 1, 1):
                sum += arr[k]
    return sum


arr = [1, 4, 2, 5, 3]
print(OddLengthSum(arr))

5a9888d7137c977e1a5f048458666510b51c45bd
<mask token>

def OddLengthSum(arr):
    sum = 0
    l = len(arr)
    for i in range(l):
        for j in range(i, l, 2):
            for k in range(i, j + 1, 1):
                sum += arr[k]
    return sum


<mask token>

def OddLengthSum(arr):
    sum = 0
    l = len(arr)
    for i in range(l):
        for j in range(i, l, 2):
            for k in range(i, j + 1, 1):
                sum += arr[k]
    return sum


<mask token>
print(OddLengthSum(arr))

def OddLengthSum(arr):
    sum = 0
    l = len(arr)
    for i in range(l):
        for j in range(i, l, 2):
            for k in range(i, j + 1, 1):
                sum += arr[k]
    return sum


arr = [1, 4, 2, 5, 3]
print(OddLengthSum(arr))
