#include <bits/stdc++.h>
using namespace std;
double max2(double a, double b) { return a > b ? a : b; }
double min2(double a, double b) { return a < b ? a : b; }
int main() {
  int x1, y1, r1;
  int x2, y2, r2;
  cin >> x1 >> y1 >> r1;
  cin >> x2 >> y2 >> r2;
  double dist = sqrt((double)((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));
  if (dist >= r1 + r2) {
    cout.precision(15);
    cout << fixed << (dist - r1 - r2) / 2 << endl;
  } else if (dist >= max2(r1, r2) - min2(r1, r2)) {
    cout << 0 << endl;
  } else {
    cout.precision(15);
    cout << fixed << (max2(r1, r2) - dist - min2(r1, r2)) / 2 << endl;
  }
}
