#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, a1, b1, c1;
  double s, l;
  while (cin >> a >> b >> c >> a1 >> b1 >> c1) {
    s = (a - a1) * (a - a1) + (b - b1) * (b - b1);
    s = sqrt(s);
    l = c + c1;
    if (s > l) {
      s = (s - l) / 2;
    } else if (s < l) {
      if (s == c || s == c1) s = 0;
      if (s > c && s > c1)
        s = 0;
      else {
        if (c > c1) {
          if (s < c - c1)
            s = c - c1 - s;
          else
            s = 0;
        } else if (c < c1) {
          if (s < c1 - c)
            s = c1 - c - s;
          else
            s = 0;
        }
        s = s / 2;
      }
    } else if (s == l)
      s = 0;
    printf("%.8f\n", s);
  }
  return 0;
}
