#include <bits/stdc++.h>
using namespace std;
long double e = 1e-12;
int main() {
  int x1, y1, x2, y2, r1, r2;
  cin >> x1 >> y1 >> r1;
  cin >> x2 >> y2 >> r2;
  long double d = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)), ans;
  if (r1 + r2 <= d + e)
    ans = d - r1 - r2;
  else if (r1 >= d + r2 - e)
    ans = r1 - r2 - d;
  else if (r2 >= d + r1 - e)
    ans = r2 - r1 - d;
  else
    ans = 0;
  cout << setprecision(7) << fixed << ans / 2;
}
