#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(15);
  long double x, y, r, xx, yy, rr;
  cin >> x >> y >> r >> xx >> yy >> rr;
  long double ans = (x - xx) * (x - xx) + (y - yy) * (y - yy);
  if (ans >= (r + rr) * (r + rr)) {
    cout << (sqrt(ans) - r - rr) / 2;
    exit(0);
  }
  if (ans <= (r - rr) * (r - rr)) {
    cout << (fabs(rr - r) - sqrt(ans)) / 2;
    exit(0);
  }
  cout << "0.000000000000";
}
