#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;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKI2RlZmluZSBlbAkJCQknXG4nCiNkZWZpbmUgc3oodikJCQkoKGludCkoKHYpLnNpemUoKSkpCiNkZWZpbmUgY2xyKHYsIGQpCQltZW1zZXQodiwgZCwgc2l6ZW9mKHYpKQoKZG91YmxlIGNvbnN0IEVQUyA9IDFlLTgsIFBJID0gYWNvcygtMSk7CmNvbnN0IGludCBOID0gMTAwMCArIDksIE0gPSAzMCArIDcsIE9PID0gKGludCkgMWU2ICsgMTsKY29uc3QgbG9uZyBsb25nIE1PRCA9IDFlOSArIDcsIElORiA9IDFlMTggKyA5OwoKdHlwZWRlZiBsb25nIGxvbmcgbGw7CnR5cGVkZWYgbG9uZyBkb3VibGUgbGxkOwoKdm9pZCBPVVRQVVQoKSB7Cgljb3V0IDw8IGZpeGVkIDw8IHNldHByZWNpc2lvbigxMik7Cglpb3M6OnN5bmNfd2l0aF9zdGRpby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