#include using namespace std; int main(){ int n,a[8]={14,1,2,4,7,8,11,13}; cin>>n; int ans=(n-1)/8*15; ans+=a[n%8]; cout<