def METHOD_NAME(arr, tree, node, start, end):
    if start == end:
        tree[node] = arr[start]
        return
    mid = (start + end) // 2
    METHOD_NAME(arr, tree, 2 * node, start, mid)
    METHOD_NAME(arr, tree, 2 * node + 1, mid + 1, end)
    tree[node] = tree[2 * node] + tree[2 * node + 1]