Modify the following Python program to print the sum of all its elements.
# Given a list

list = [1, 2, 3, 4, 5]
# Given a list

list = [1, 2, 3, 4, 5]
 
# Calculate sum
sum_val = 0
for num in list:
 sum_val += num
 
# Print the result
print(sum_val) # returns 15