#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, x2, y1, y2, r1, r2;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  if (r1 > r2) swap(r1, r2);
  int dx = x1 - x2, dy = y1 - y2;
  double dist = sqrt((double)dx * dx + dy * dy);
  if (dist > r1 + r2)
    cout << setprecision(9) << fixed << .5 * (dist - r1 - r2) << endl;
  else if (dist + r1 < r2)
    cout << setprecision(9) << fixed << .5 * (r2 - r1 - dist) << endl;
  else
    cout << 0 << endl;
  return 0;
}
