#include <bits/stdc++.h>
using namespace std;
int main() {
  double x1, y1, r1, x2, y2, r2, result, Distance;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  Distance = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  result = max(max(0.0, r1 - Distance - r2),
               max(r2 - Distance - r1, Distance - r1 - r2));
  cout << fixed << setprecision(15) << result / 2.0 << endl;
  return 0;
}
