#include<bits/stdc++.h>
using namespace std;

int main(){
  double sx,sy,gx,gy;cin>>sx>>sy>>gx>>gy;
  gy*=-1;
  
  double a=(sy-gy)/(sx-gx);
  
  cout<<fixed<<setprecision(10)<<sx-sy/a<<endl;
}

#include<bits/stdc++.h>
// #pragma GCC target("fpmath=387") // Turns on excess precision
using namespace std;
const int p = 31;
const int m = 998244353;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef int in;
#define ar array
#define ff first
#define ss second
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i : x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
int main() {

    ld x = 0.0, y = 0.0, r = 0.0;
    cin>>x>>y>>r;
  	r = nextafter(r,INFINITY);
    ld xmn = (ld)(x - r), xmx = (ld)(x + r);
    ll xlf = ceil(xmn), xrt = floor(xmx);
    ll ans = 0;
    ll now = xlf;
    while (now <= xrt) {
        ld val = sqrtl(r*r-(x-now)*(x-now));
        ll a=ceil(y-val);
        ll b=floor(y+val);
        ans +=b-a+1;
        now++;
    }
    cout << ans;
    return 0;
}