#include<iostream> using namespace std; int main(){ double x,y; cin>>x; if(x<=15.0){ cout<<6*x; }else{ cout<<9*x; } return 0; }