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