#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1);
inline int sign(double a) { return a < -eps ? -1 : a > eps; }
inline int cmp(double a, double b) { return sign(a - b); }
double add(double a, double b) {
  if (abs(a + b) < eps * (abs(a) + abs(b))) return 0;
  return a + b;
}
struct P {
  double x, y;
  P() {}
  P(double x, double y) : x(x), y(y) {}
  P operator+(const P &p) { return P(x + p.x, y + p.y); }
  P operator-(const P &p) { return P(x - p.x, y - p.y); }
  P operator*(double d) { return P(x * d, y * d); }
  P operator/(double d) { return P(x / d, y / d); }
  bool operator==(const P &p) { return cmp(x, p.x) == 0 && cmp(y, p.y) == 0; }
  double dot(const P &p) { return x * p.x + y * p.y; }
  double det(const P &p) { return x * p.y - y * p.x; }
  double disto(const P &p) { return (*this - p).abs(); }
  double alpha() { return atan2(y, x); }
  double abs() { return sqrt(abs2()); }
  double abs2() { return x * x + y * y; }
  P rot90() { return P(-y, x); }
  P unit() { return *this / abs(); }
  bool operator<(P p) const {
    int c = cmp(x, p.x);
    if (c) return c == -1;
    return cmp(y, p.y) == -1;
  }
  friend istream &operator>>(istream &in, P &p) {
    in >> p.x >> p.y;
    return in;
  }
  friend ostream &operator<<(ostream &out, P &p) {
    out << p.x << ' ' << p.y;
    return out;
  }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  P p1, p2;
  double r1, r2;
  cin >> p1 >> r1 >> p2 >> r2;
  double d = p1.disto(p2);
  if (r1 < r2) swap(r1, r2);
  if (d >= r1 + r2) {
    cout << (d - r1 - r2) / 2 << '\n';
  } else if (r1 >= r2 + d) {
    cout << (r1 - r2 - d) / 2 << '\n';
  } else {
    cout << 0.0 << '\n';
  }
  return 0;
}
