// AOJ 2134: Deadly Dice Game
// 2017.11.9 bal4u@uu

#include <stdio.h>
#include <string.h>

double a[2002][2002];

char buf[2002], *bp;
int getint()
{
	int n = 0;
	while (*bp >= '0') n = (n<<3) + (n<<1) + (*bp++ & 0xf);
	return n;
}

int main()
{
	int n, t, i, j, jj, k;
	double p, ans;
	
	while (fgets(bp=buf, 20, stdin) && *bp != '0') {
		n = getint(), bp++, t = getint();
		memset(a, 0, sizeof(a));
		fgets(bp=buf, sizeof(buf), stdin);
		for (i = 0; i < n; i++) a[0][i] = (*bp++ == 'R');
		for (i = 0; i < t; i++) for (j = 0; j < n; j++) {
			for (p = 0, jj = j, k = 1; k <= 6; k++) {
				if (++jj == n) jj = 0;
				a[i+1][jj] += a[i][j]/6;
			}
		}
		for (ans = 0, i = 0; i < n; i++) if (a[t][i] > ans) ans = a[t][i];
		printf("%.12f\n", ans);
	}
	return 0;
}