#include<iostream>
#include<iomanip>
#include<algorithm>
#include<cmath>
#include<cstdio>

#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n)   REP(i,0,n)
#define inf (1<<29)
#define MAX 3000
using namespace std;
typedef long double ld;

int N,T;
char en[MAX];
ld dp[MAX][2];

int main()
{
  while(scanf("%d %d",&N,&T), N|T)
    {
      getchar();
      rep(i,N)scanf("%c",&en[i]);

      rep(i,N)rep(j,2)dp[i][j] = 0;
      dp[0][0] = 1;
      rep(phase,T)
	{
	  rep(cur,N)rep(k,6)
	    dp[(cur+k+1)%N][(phase+1)&1] += dp[cur][phase&1]*(1.0/6);
	  
	  rep(i,N)dp[i][phase&1] = 0;
	}

      ld ans = 0;
      rep(sp,N)
	{
	  ld cost = 0;
	  rep(i,N)
	    {
	      if(en[(sp+i)%N] == 'R')cost += dp[i%N][T&1];
	    }
	  ans = max(ans,cost);
	}

      cout << setiosflags(ios::fixed) << setprecision(10) << ans << endl;

    }
  return 0;
}