#include <stdio.h>
int main()
{
//nice too meet you!
int day, i;
double sum=0, change, money, ;
scanf("%lf %d", &money, &day);
sum=money;
for(i=1; i<=day; i++)
{
scanf("%lf", &change);
if(change<0.5)
{
sum=sum-(sum*What/100); //what이 음수인데 그걸 정수로 만들어야함
}
if(change>0.5)
{
sum=sum+(sum*change/100);
}
}
printf("%.0f\n", sum-money);
if(sum>money)
{
printf("good");
}
else if(sum<money)
{
printf("bad");
}
else if(sum==money)
{
printf("same");
}
}