#include <bits/stdc++.h>
using namespace std;
int main() {
  long double x1, y1, r1, x2, y2, r2;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  long double dist = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
  if (dist < fabs(r1 - r2))
    dist -= fabs(r1 - r2);
  else if (dist > r1 + r2)
    dist -= (r1 + r2);
  else
    dist = 0;
  dist /= 2;
  dist = fabs(dist);
  cout << fixed << setprecision(10);
  cout << dist << endl;
}
