#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define ll long long
#define rep(i,n) for (int i = 0; i < (n); i++)
#define coutf(f) cout << fixed << setprecision(f)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()

int main() {
	double p, c;
	cin >> p >> c;
	double x = (double)(2 + 3 + 5 + 7 + 11 + 13) / 6;
	double y = (double)(4 + 6 + 8 + 9 + 10 + 12) / 6;
	coutf(15) << pow(x, p) * pow(y, c) << endl;
	return 0;
}