//Code written by Li Zexuan (Looks handsome)
#include<bits/stdc++.h>
using namespace std;

bool azqwq (int x) {
	if (x == 1) {
		return true;
	}
	return false;
}

int main() {
	freopen("taxi.in", "r", stdin);
	freopen("taxi.out", "w", stdout);
	float n;
	int days;
	float az =  9;
	cin >> n >> days;
	if (n <= 3) {
		cout << az << ".00" << endl;
		return 0;
	} else  if (n <= 6) {
		if (azqwq(days)) {
			az += (n - 3) * 1.5;
		} else {
			az += (n - 3) * 1.75;
		}
	} else if (n > 6){
		if (azqwq(days)) {
			az += 3 * 1.5;
		} else {
			az += 3 * 1.75;
		}
		if (azqwq(days)) {
			az += (n - 6) * 2.25;
		} else {
			az += (n - 6) * 2.5;
		}
	}
	printf("%.2f\n", az);
	return 0;
}
//Code written by Li Zexuan (Looks handsome)
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

ll sum(ll x) {
	if (x == 1) {
		return 1;
	} else {
		return x + sum(x - 1);
	}
}

int main() {
	freopen("number.in", "r", stdin);
	freopen("number.out", "w", stdout);
	ll n;
	cin >> n;
	for (ll i = (ll)sqrt(sqrt(pow(n, 2.05))); ; i++) {
		if (n - sum(i) > 0) {
			continue;
		}
		ll ans = sum(i);
		for (ll j = 1; j <= i; j++) {
			if (ans - 2 * j == n) {
				cout << j << ' ' << i << endl;
				return 0;
			}
		}
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

int main() {
	freopen("class.in", "r", stdin);
	freopen("class.out", "w", stdout);
	long long t, timex = 0;
	cin >> t;
	if(t >= 7){
		timex += t / 7 * 34;
		t = t % 7;
		if(t == 6){
			timex += 34;
		} else {
			timex += t * 6;
		}
	}
	cout << (long long)timex * 40 << endl;
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

int cnt = 1, cnt_1 = 1;

int abc (int x) {
	if (x % 2 == 1 && x != 1) {
		cnt_1++;
		return abc(x * 3 + 1);
	} else if (x % 2 == 0) {
		cnt_1++;
		return abc(x / 2);
	} else {
		return 0;
	}
}

int main() {
	freopen("chain.in", "r", stdin);
	freopen("chain.out", "w", stdout);
	int a, b;
	cin >> a >> b;
	for(int i = a; i <= b; i++){
		abc(i);
		cnt = max(cnt, cnt_1);
		cnt_1 = 1;
	}
	abc(a);
	cout << cnt << endl;
	return 0;
}