#include <bits/stdc++.h>
using namespace std;
int main() {
  double x1, y1, r1, x2, y2, r2, d, r, swp;
  cin >> x1 >> y1 >> r1;
  cin >> x2 >> y2 >> r2;
  if (r2 < r1) {
    swp = r2;
    r2 = r1;
    r1 = swp;
  }
  cout << fixed << setprecision(15);
  d = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  if (d > r1 + r2) {
    r = (d - r1 - r2) / 2.0;
    cout << r << endl;
  } else if (d <= r1 + r2 && d >= r2 - r1)
    cout << "0.000000000\n";
  else {
    r = (r2 - d - r1) / (2.0);
    cout << r << endl;
  }
  return 0;
}
