#include <bits/stdc++.h>
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--)
#define rep(i, n) FOR(i,0,n)
#define irep(i, n) IFOR(i,0,n)
#define all(v) begin(v), end(v)
using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
using VI = vector<int>;
using VLL = vector<ll>;
using VB = vector<bool>;
template<typename T>istream& operator>>(istream&i,vector<T>&v){rep(j,v.size())i>>v[j];return i;}
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
bool second_compare(P a,P b){if(a.second!=b.second){return a.second<b.second;} else return true;}

vector<pair<ll, ll> > prime_factorize(ll n) {
    vector<pair<ll, ll> > res;
    for (ll i = 2; i*i <= n; i++) {
        if (n % i != 0) continue;
        ll ex = 0;
        while (n % i == 0) {
            ++ex;
            n /= i;
        }
        res.push_back({i, ex});
    }
    if (n != 1) res.push_back({n, 1});
    return res;
}

int modPow(ll a, ll n, ll p) {
    if (n == 0) return 1;
    if (n == 1) return a % p;
    if (n % 2 == 1) return (a * modPow(a, n - 1, p)) % p;
    ll t = modPow(a, n / 2, p);
    return (t * t) % p;
}

int main() {
    long double x, y, r;
    cin >> x >> y >> r;
    r += 1e-14;
    ll low = ceil(x-r), high = floor(x+r);
    ll ans = 0;
    for (ll i = low-2; i < high+2; i++) {
        if (pow(r,2)-pow((x-(long double)i),2) < 0.0) continue;
        long double p = sqrt(pow(r,2)-pow((x-(long double)i),2));
        ll bt = (ll)ceil(y-p), tp = (ll)floor(y+p);
        ans+=(tp+1-bt);
    }
    cout << ans << endl;
    return 0;
}
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <math.h>
#include <string>
#include <numeric>
#include <queue>
#include <cstdio>
#include <cstring>
#define ll long long
#define rep(i,n) for(ll i=0;i<n;++i)
#define rep1(i,n) for(ll i=1;i<n;++i)
#define mrep(i,n) for(ll i=n;i>=0;--i)
#define all(a) (a).begin(),(a).end()
#define vl vector<ll>
#define vvl vector<vector<ll> >
#define vb vector<bool>
#define vvb vector<vector<bool> >
#define pl pair<ll,ll>
#define inf 1001001001001001000
#define mod 1000000007
//#define mod 998244353
#define pi 3.1415926535
using namespace std;
struct __INIT{
    __INIT(){
        cin.tie(0);
        ios::sync_with_stdio(false);
        cout<<fixed<<setprecision(15);
    }
}__init;

ll gcd(ll a,ll b){
    if(a<b) return gcd(b,a);
    ll r;
    while((r=a%b)){
        a = b;
        b = r;
    }
    return b;
}

//necessary gcd
ll gcds(vl a){
    ll ret = a[0];
    rep1(i,a.size()){
        ret = gcd(ret,a[i]);
    }
    return ret;
}


int main(){
    ll n;
    cin>>n;
    vl a(n);
    rep(i,n) cin>>a[i];
    cout<<gcds(a)<<endl;
}