#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 c1c2 = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
  if (r1 < r2) {
    swap(r1, r2);
  }
  if (c1c2 > r1 + r2) {
    long double ans = (c1c2 - r1 - r2) / 2;
    cout << setprecision(15) << ans;
  } else if (c1c2 > r1 - r2 && c1c2 < r1 + r2) {
    cout << 0;
  } else {
    long double ans = r1 - c1c2 - r2;
    if (ans < 0) {
      cout << 0;
      return 0;
    }
    cout << setprecision(15) << ans / 2;
  }
}
