#include <bits/stdc++.h>
using namespace std;
int main() {
  long double x1, y1, r1, x2, y2, r2, d, e, t, u;
  cin >> x1 >> y1 >> r1;
  cin >> x2 >> y2 >> r2;
  std::cout << std::fixed;
  std::cout << std::setprecision(20);
  d = (x1 - x2) * (x1 - x2);
  e = (y1 - y2) * (y1 - y2);
  u = d + e;
  t = sqrt(u);
  std::cout << std::fixed;
  std::cout << std::setprecision(20);
  if (t > r1 + r2) {
    t = (t - r1);
    t = t - r2;
    t = t / 2;
    cout << t << "\n";
    return 0;
  } else if (t + r2 < r1) {
    t = t + r2;
    t = r1 - t;
    t = t / 2;
    cout << t << "\n";
    return 0;
  } else if (t + r1 < r2) {
    t = (t + r1);
    t = r2 - t;
    t = t / 2;
    cout << t << "\n";
    return 0;
  } else if (t + r1 > r2 || t + r2 > r1) {
    cout << 0 << "\n";
    return 0;
  }
  return 0;
}
