import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int sum= 0; int []array= new int[n]; for(int i = 0; i < n; i++){ sum = 0; int number = in.nextInt(); for(int j = number; j > 0 ;j -=2){ if(j == 1){ array[i] = 1; break; } if(j % 2 != 0){ sum +=j+1; array[i] = sum; break; } if(j % 2 == 0){ sum ++; } if(j == 2){ array[i]= sum +(sum * 2)+1; } } } int t = 0; for(int i = 0 ; i< n; i++){ t +=array[i]; } System.out.println(t); } }