#include<iostream> int main(){int n;while(std::cin>>n)std::cout<<15*((n-1)/8)+2*((n-1)%8)+(n%8==1||n%8==4||n%8==6||n%8==7)<<'\n';}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page