#include <bits/stdc++.h>
using namespace std;
double distance(int x1, int y1, int x2, int y2) {
  return sqrt((double)((x1 - x2) * (x1 - x2) + (y2 - y1) * (y2 - y1)));
}
int main() {
  cout.precision(17);
  int x1, y1, x2, y2;
  double r1, r2, d;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  d = distance(x1, y1, x2, y2);
  if (d > r1 + r2)
    cout << (d - (r1 + r2)) / 2.0 << endl;
  else if (d + min(r1, r2) < max(r1, r2))
    cout << ((max(r1, r2) - d - min(r1, r2)) / 2.0) << endl;
  else
    cout << 0 << endl;
  return 0;
}
