#include <bits/stdc++.h>
using namespace std;
int solve() {
  double x1, y1, r1, x2, y2, r2, d;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  d = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  double ans;
  if (d > r1 + r2) {
    ans = (d - r1 - r2) / 2;
  } else {
    double xr = max(r1, r2);
    double nr = min(r1, r2);
    if (d + nr >= xr)
      ans = 0;
    else {
      ans = (xr - d - nr) / 2;
    }
  }
  cout << ans;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
