#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second

typedef long long ll;
typedef pair<int,int> ii;

double a, b, c, d;

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin >> a >> b >> c >> d;
    cout << fixed << setprecision(12);
    cout << a + b*(c-a)/(b+d) << '\n';
    return 0;
}
#include <bits/stdc++.h>
#define ll long long
using namespace std;
template <typename T>
void read(T &x) {
	x = 0; char c = getchar(); int f = 0;
	for (; !isdigit(c); c = getchar())
		f |= c == '-';
	for (; isdigit(c); c = getchar())
		x = x * 10 + (c ^ '0');
	if (f) x = -x;
}

template <typename T>
void write(T x, char ed = '\n') {
	if (x < 0) putchar('-'), x = -x;
	static short st[30], tp;
	do st[++tp] = x % 10, x /= 10; while (x);
	while (tp) putchar(st[tp--] | '0');
	putchar(ed);
}

int ans[23453], cnt, lim = 90;
ll f[43242], n;
int main() {
	//srand((ll)new char ^ time(0));
	//n = (1e18) - rand();
	read(n);
	f[0] = f[1] = 1;
	for (int i = 2;i <= lim; ++i) f[i] = f[i - 1] + f[i - 2];
	for (int i = 1;i <= lim; ++i) {
		if (n >= f[lim - i + 1]) ans[++cnt] = 2 - (i & 1), n -= f[lim - i + 1];
		if (cnt) ans[++cnt] = 3 + (i & 1);
	}
	write(cnt);
	for (int i = 1;i <= cnt; ++i) write(ans[i]);
	//ll x = 0, y = 0;
	//for (int i = 1;i <= cnt; ++i) {
		//if (ans[i] == 1) ++x;
		//else if (ans[i] == 2) ++y;
		//else if (ans[i] == 3) x += y;
		//else y += x;
	//}
	//write(x, ' '), write(y);
	return 0;
}
