#include using namespace std; int main(){ int x; cin>>x; cout<<(x==2?2:4+x%2+(x-3)/2*10)<