#include <stdio.h>
double price(double ditance,double period)
{
double price3=0;
if(ditance<3)
{
price3=13;
}
else if(period<23||period>5)
{
double price3=13+(ditance-3)*2.3;
}
else
{
double price3=13+(ditance-3)*2.3*1.2;
}
return price3;
}
int main()
{
double price0=0;
double price1=0;
double price2=0;
double ditance1=0;
double period1=0;
double period2=0;
scanf("%d%d%d",&ditance1,&period1,&period2);
price1=price(ditance1,period1);
price2=price(ditance1,period2);
price0=price1+price2+2;
printf("小明每天打车的总费用为%lf\n",price0);
return 0;
}