#include <stdio.h>
#define MAX 6
int main(void)
{
unsigned int num[MAX],i,sum_num=0;
for(i=0;i<MAX;i++)
scanf("%d",&num[i]);
for(i=1;i<MAX;i++)
sum_num+=num[i]<num[0]?num[i]:0;
printf("%d/n",sum_num);
return 0;
}