#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
int main() {
  int x1, x2, y1, y2, r1, r2;
  cin >> x1 >> y1 >> r1;
  cin >> x2 >> y2 >> r2;
  double dist = sqrt(1. * (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) * 1.);
  cout.precision(20);
  if (dist >= r1 + r2)
    cout << (dist - r1 - r2) * 0.5;
  else if (dist >= max(r1, r2))
    cout << 0;
  else
    cout << max(0., max(r1, r2) - dist - min(r1, r2)) * 0.5;
  return 0;
}
