include[HTML_REMOVED]
using namespace std;
int main()
{
double a[12][12],r=0;
int n,i,j;
char c;
scanf(“%d\n”,&n);
scanf(“%c\n”,&c);
for(i=0; i<12; i)
{
for(j=0; j<12; j)
{
scanf(“%lf”,&a[i][j]);
if(j==n)
r=r+a[i][j];
}
}
if(c ==’S’)
printf(“%.1f”,r);
else
printf(“%.1f”,r/12.0);
return 0;
}