include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
int main()
{int L;
char a;
double sum=0;
cin>>L>>a;
double b[12][12];
for(int i=0;i<12;i){
for(int j=0;j<12;j){
cin>>b[i][j];
}
}
int i=L;
if(a==’S’){
for(int j=0;j<12;j++){
sum+=b[i][j];
}printf("%.1lf\n",sum);
}else {for(int j=0;j<12;j++){
sum+=b[i][j];
}printf("%.1lf\n",sum/12);
}
return 0;
}