#include <iostream>
#include <algorithm>

using namespace std;

int main(){
  int N, ary[100], sum = 0;
  
  cin >> N;
  
  for(int i = 0; i < N; i++)cin >> ary[i]
  
  sort(arr, arr + N);
  
  for(int i = 0; i < N; i++){
    sum += (ary[i] + ary[i + 1]) / 2;
  }
  cout << sum << endl;
}