#!/usr/bin/python3

n = 4
ar = [1, 2, 3, 4]

def simpleArraySum(ar):
    i = 0
    total = 0
    for i in range(0,ar_count):
        if i < (ar_count-1):
            total += (ar[i])
        elif i == (ar_count-1):
            total += (ar[i])
            return (total)


print(simpleArraySum(ar))
