#include <stdio.h>
int main(){
float money;
while(scanf("%f",&money)!=EOF){
float change;
float max=0;
for(int i=0;i<12;i++)
{
scanf("%f",&change);
if(max<change)
max=change;
}
printf("%.2f\n",max*money);
}
return 0;
}
/**************************************************************
Problem: 2031
User: wangyichen2
Language: C++
Result: Accepted
Time:9 ms
Memory:1144 kb
****************************************************************/