object Main extends App {
	val n = scala.io.StdIn.readInt
	val a = new Array[Long](n)

	for(i<-0 until n){
		a(i) = scala.io.StdIn.readLong
	}

	var ans = 0L
	var tp = 0L

	for(i<-0 until n){
		ans += (a(i) + tp)/2L
		tp = (a(i) - tp)%2L
	}

	println(ans)

}