#include <bits/stdc++.h>
using namespace std;
const int N = 1000 + 11;
int sdis(int x, int y, int xx, int yy) {
  int dx = x - xx;
  int dy = y - yy;
  return dx * dx + dy * dy;
}
int main() {
  int ax, ay, ar, bx, by, br;
  while (cin >> ax >> ay >> ar >> bx >> by >> br) {
    int ds = sdis(ax, ay, bx, by);
    if ((ar + br) * (ar + br) <= ds) {
      printf("%.10lf\n", (sqrt(ds + 0.0) - ar - br) * 0.5);
    } else if (ds <= (ar - br) * (ar - br)) {
      printf("%.10lf\n", (abs(ar - br) - sqrt(ds + 0.0)) * 0.5);
    } else {
      printf("%.10lf\n", 0.0);
    }
  }
}
