function Main(input) {
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});    
    var N = parseInt(input[0][0], 10);
    var vec_A = input[1].map(e => parseInt(e, 10));
    var tmp = vec_A[0];
    for (var i = 1; i < N; i++){
        tmp = saidaiKoyaku(tmp, vec_A[i]);
    }

    console.log(tmp);
}


function saidaiKoyaku(x, y){
    if (x < y) [x, y] = [y, x];
    var tmp1 = x;
    var tmp2 = y;
    while (tmp2 != 0){
        [tmp1, tmp2] = [tmp2, tmp1 % tmp2];
    }
    return tmp1;
}

Main(require("fs").readFileSync("/dev/stdin", "utf8")); 