#include <bits/stdc++.h>
using namespace std;
int main() {
  cout.precision(15);
  double x1, y1, r1;
  double x2, y2, r2;
  cin >> x1 >> y1 >> r1;
  cin >> x2 >> y2 >> r2;
  double res =
      (sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) - r1 - r2) / 2;
  if (res < 0) {
    res = (abs(r2 - r1) - sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))) /
          2;
  }
  if (res < 0) res = 0;
  cout << res << endl;
  return 0;
}
