#include <stdio.h>
#include<iostream>
#include <string>
#include <string.h>
#include <vector>
#include <cmath>
#include <algorithm>
#include <queue>
#include <climits>
#include <set>
#include <unordered_map>
#include <map>
#include <stack>
#include <unordered_set>
#define hash hassh
using namespace std;
int main() {
    int T=1;
    //cin>>T;
    while(T--) {
        long double x,y,r;
        cin>>x>>y>>r;
        long long ans=0;
        r+=1e-14;
        int st=ceil(x-r),ed=floor(x+r);
        for(int i=st;i<=ed;i++){
            long double d=sqrt(r*r-(x-i)*(x-i));
            int top=floor(y+d),bot=ceil(y-d);
            ans+=top-bot+1;
        }
        printf("%lld\n",ans);
    }
    return 0;
}
#include<bits/stdc++.h>
#define r(i,n)for(int i=0;i<n+1;i++)
#define e(a,b)a=min(a,b);
#define g r(i,n)r(j,k)r(c,k)
#define h d[i][j][c]
using namespace std;int64_t d[110][110][110],x,f=LLONG_MAX,b=f; main(){int n,a[110];cin>>n>>x;r(i,n)cin>>a[i];r(k,n){k++;g h=f;d[0][0][x%k]=x;g if(f-h){e(d[i+1][j][c],h)if(j<k)e(d[i+1][j+1][((c-a[i])%k+k)%k],h-a[i])}if(f-d[n][k][0])e(b,d[n][k][0]/k);k--;}cout<<b<<"\n";}