#include<stdio.h> int main(void) { int kil; int flag=0; double sum; while(scanf("%d",&kil)&&kil!=0) { sum=0; flag=0; while(kil) { if(kil<=4) { sum+=10; kil-=kil; } else if(kil<=8) { sum+=(kil-4)*2+10; kil-=kil; } else if(kil<=12) { flag=1; sum+=18+(kil-8)*2.4; kil-=kil; } else { sum+=18; kil-=8; } } printf(flag==0? "%.0lf ":"%.1lf ",sum); } return 0; }