#include <string>
#include <vector>
#include <iostream>
#include <queue>
#include <functional>
#include <algorithm>
#include <random>
#include <cmath>
#include <climits>
#include <iomanip>
#include <cfloat>
#include <set>
#include <map>
#include <tuple>
#include <array>
int main() {
	std::array<std::array<double, 2000>, 2> memo;
	int n, t;
	std::string str;
	double max = 0;
	std::cout << std::setprecision(16);
	while (true) {
		std::cin >> n >> t;
		if (n == 0 && t == 0) return 0;
		std::cin >> str;
		for (auto i = 0; i < str.size(); ++i) {
			if (str[i] == 'R') memo[0][i] = 1;
			else memo[0][i] = 0;
		}
		for (auto times = 0; times < t; ++times) {
			for (auto i = 0; i < n; ++i) {
				memo[(times + 1) % 2][i] = 0;
				for (auto d = 1; d <= 6; ++d) {
					memo[(times + 1) % 2][i] += memo[times % 2][(i + d) % n];
				}
				memo[(times + 1) % 2][i] /= 6;
			}
		}
		max = 0;
		for (auto i = 0; i < n; ++i) {
			if (max < memo[t % 2][i]) max = memo[t % 2][i];
		}
		std::cout << max << std::endl;
	}
}
