Difference between Sum of Even Numbers and Sum of Odd Numbers

Program to find difference between sum of even numbers and sum of odd numbers.

n = int(input())
li = list(map(int,input().split()))[:n]
result = 0
for ele in li:
    if ele%2==0:
        result+=ele
    else:
        result-=ele
print(result)
Input 7
8 6 4 2 9 7 3
Output
1