import scala.annotation._

object Main{
	def main(args:Array[String]){
		val s = new java.util.Scanner(System.in)
		var n,v=s.nextInt
		for(i<-2 to n map(_=>s.nextInt))
			v=gcd(v,i)
		println(v)
	}
	@tailrec
	def gcd(a:Int,b:Int):Int = if(a % b < 1) b else gcd(b,a % b)
}