#include <bits/stdc++.h>

using namespace std;

#define el				'\n'
#define sz(v)			((int)((v).size()))
#define clr(v, d)		memset(v, d, sizeof(v))

double const EPS = 1e-8, PI = acos(-1);
const int N = 1000 + 9, M = 30 + 7, OO = (int) 1e6 + 1;
const long long MOD = 1e9 + 7, INF = 1e18 + 9;

typedef long long ll;
typedef long double lld;

void OUTPUT() {
	cout << fixed << setprecision(12);
	ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
}

void INPUT() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);
#endif
}

int main() {
	INPUT();
	OUTPUT();
	lld a, b, c, x;
	cin >> a >> b >> c >> x;

	lld ans = c;
	lld rg = sqrt((c + b) * (c + b) + a * a);
	ans += rg;
	lld ratio = x / (lld) 100;
	lld gh = ratio * sqrt(a * a + b * b);
	ans += gh;
	ans += (b + c - (b * ratio));
	lld kk = a - (a * ratio);
	ans += sqrt(kk * kk + c * c);
	cout << ans << el;

	return 0;
}
