#include<iostream>
#include<cmath>
#include<iomanip>
#include<windows.h>
using namespace std;
struct node
{
int hp1;
int ap1;
int hp2;
int ap2;
}seq[1<<16];
int front = 0;
int rear = 0;
void push(node n)
{
seq[rear].hp1 = n.hp1;
seq[rear].ap1 = n.ap1;
seq[rear].hp2 = n.hp2;
seq[rear].ap2 = n.ap2;
rear++;
}
void pop(node &n)
{
n.hp1 = seq[front].hp1;
n.ap1 = seq[front].ap1;
n.hp2 = seq[front].hp2;
n.ap2 = seq[front].ap2;
front++;
}
int main()
{
int floor = 0;
float sum = 0;
int count[1<<15] = {0};
count[0] = 1;
node n,t;
cin>>n.hp1>>n.ap1>>n.hp2>>n.ap2;
if((n.hp1<1||n.hp1>32767)&&(n.ap1<1||n.ap1>32767)&&(n.hp2<1||n.hp2>32767)&&(n.ap2<1||n.ap2>32767))
return 0;
push(n);
while(front!=rear)
{
pop(n);
if(count[floor] == 0)
floor++;
count[floor]--;
if(n.hp1<=0)
;
else if(n.hp2<=0)
{
sum += 1.0/pow(2,(double)floor);
}else
{
count[floor+1] = count[floor+1] + 2;
t.hp1 = n.hp1 - n.ap2;
t.ap1 = n.ap1;
t.hp2 = n.hp2;
t.ap2 = n.ap2;
push(t);
t.hp1 = n.hp1;
t.hp2 = n.hp2 - n.ap1;
push(t);
}
}
cout<<setprecision(4)<<setiosflags(ios::fixed)<<sum<<endl;
return 0;
}