#include <bits/stdc++.h>
using namespace std;
int main() {
  double x1, y1, r1, x2, y2, r2;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  double dis = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  if (dis > (r1 + r2)) {
    double ans = dis - r1 - r2;
    ans /= 2;
    cout << fixed << setprecision(15) << ans << endl;
  } else if (dis <= abs(r1 - r2)) {
    double rr, rrr;
    if (r1 > r2) {
      rr = r1;
      rrr = r2;
    } else {
      rr = r2;
      rrr = r1;
    }
    cout << fixed << setprecision(15) << (rr - rrr - dis) / 2;
    return 0;
  } else if (dis <= abs(r1 + r2)) {
    cout << "0.00000000000000" << endl;
    return 0;
  }
}
