#include <bits/stdc++.h>
using namespace std;
const long double eps = 0.000001;
int main() {
  long double x, y, r;
  cin >> x >> y >> r;
  long double X, Y, R;
  cin >> X >> Y >> R;
  long double V = sqrt((X - x) * (X - x) + (Y - y) * (Y - y));
  cout << setprecision(20) << fixed;
  if (V - R - r > eps)
    cout << (V - R - r) / 2 << endl;
  else if (abs(R - r) - V > eps)
    cout << (abs(R - r) - V) / 2 << endl;
  else
    cout << 0 << endl;
  fclose(stdin);
  fclose(stdout);
  return 0;
}
