#include <bits/stdc++.h>
using namespace std;
int sqr(int v) { return v * v; }
int main() {
  int x1, y1, x2, y2, r1, r2;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  if (r1 < r2) swap(x1, x2), swap(y1, y2), swap(r1, r2);
  int t1 = sqr(x1 - x2) + sqr(y1 - y2);
  long double ans(0);
  if (t1 < sqr(r1 - r2))
    ans = r1 - r2 - sqrt((long double)t1);
  else if (t1 > sqr(r1 + r2))
    ans = sqrt((long double)t1) - r1 - r2;
  cout << fixed << setprecision(20) << ans / 2 << endl;
}
