#include <bits/stdc++.h>
using namespace std;
int main() {
  int x[2], y[2], r[2];
  cin >> x[0] >> y[0] >> r[0];
  cin >> x[1] >> y[1] >> r[1];
  double xx = ((x[0] - x[1]) * (x[0] - x[1])) + ((y[0] - y[1]) * (y[0] - y[1]));
  double rr = sqrt(xx);
  if (rr >= r[0] + r[1]) {
    rr = (rr - r[0] - r[1]) / 2;
  } else {
    if (r[0] >= r[1]) {
      rr = (r[0] - r[1] - rr) / 2;
    } else {
      rr = (r[1] - r[0] - rr) / 2;
    }
  }
  cout.precision(8);
  if (rr < 0) {
    rr = 0;
  }
  cout << fixed << rr;
  return 0;
}
