#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
template <typename T>
bool mmax(T &m, const T q) {
  if (m < q) {
    m = q;
    return true;
  } else
    return false;
}
template <typename T>
bool mmin(T &m, const T q) {
  if (m > q) {
    m = q;
    return true;
  } else
    return false;
}
void __print(long long first) { cerr << first; }
void __print(long first) { cerr << first; }
void __print(unsigned first) { cerr << first; }
void __print(unsigned long first) { cerr << first; }
void __print(unsigned long long first) { cerr << first; }
void __print(float first) { cerr << first; }
void __print(double first) { cerr << first; }
void __print(long double first) { cerr << first; }
void __print(char first) { cerr << '\'' << first << '\''; }
void __print(const char *first) { cerr << '\"' << first << '\"'; }
void __print(const string &first) { cerr << '\"' << first << '\"'; }
void __print(bool first) { cerr << (first ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &first) {
  cerr << '{';
  __print(first.first);
  cerr << ',';
  __print(first.second);
  cerr << '}';
}
template <typename T>
void __print(const T &first) {
  long long f = 0;
  cerr << '{';
  for (auto &i : first) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
long long dx[] = {0, 0, 1, -1};
long long dy[] = {1, -1, 0, 0};
long double eps = 1e-9;
long long sq(long long first) { return first * first; }
long double dis(long long x1, long long y1, long long x2, long long y2) {
  return (long double)sqrt((long double)(sq(x2 - x1) + sq(y2 - y1)));
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(15);
  long long first[2], second[2], r[2];
  for (long long i = 0; i < 2; i++) {
    cin >> first[i] >> second[i] >> r[i];
  }
  if (r[0] < r[1]) {
    swap(first[0], first[1]);
    swap(second[0], second[1]);
    swap(r[0], r[1]);
  }
  long double d = dis(first[0], second[0], first[1], second[1]);
  if (abs(d - (r[0] + r[1])) < eps) {
    cout << 0;
    return 0;
  }
  if (d < r[0] - r[1]) {
    long double ans = r[0] - r[1] - d;
    cout << ans / 2;
  } else if (d > r[0] + r[1]) {
    d -= (r[0] + r[1]);
    cout << d / 2;
  } else {
    cout << 0;
  }
  return 0;
}
