#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  double x1, y1, r1, x2, y2, r2;
  cin >> x1 >> y1 >> r1;
  cin >> x2 >> y2 >> r2;
  double d1 = x1 - x2, d2 = y1 - y2;
  double d = sqrt(d1 * d1 + d2 * d2);
  cout.precision(15);
  if (d > (r1 + r2))
    cout << (d - r1 - r2) / 2.0 << endl;
  else if (r1 > (d + r2))
    cout << (r1 - d - r2) / 2.0 << endl;
  else if (r2 > (d + r1))
    cout << (r2 - d - r1) / 2.0 << endl;
  else
    cout << 0 << endl;
  return 0;
}
