#include <bits/stdc++.h>
using namespace std;
mt19937_64 mt_rnd_64(chrono::steady_clock::now().time_since_epoch().count());
long long rnd(long long l, long long r) {
  return (mt_rnd_64() % (r - l + 1)) + l;
}
double getDistance(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  double x1, y1, r1, x2, y2, r2, dist;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  dist = getDistance(x1, y1, x2, y2) - r1 - r2;
  if (getDistance(x1, y1, x2, y2) + min(r1, r2) < max(r1, r2))
    dist = max(r1, r2) - getDistance(x1, y1, x2, y2) - min(r1, r2);
  cout << fixed << setprecision(7) << max((double)0, dist / 2.0);
}
