#include <iostream> #include <algorithm> #include <cstring> #include <cmath> #include <cstdlib> #include <vector> #include <map> #include <set> #include <string> using namespace std; long long k = 3; long long n; int main() { cin.sync_with_stdio(false); cout.sync_with_stdio(false); cin >> n; if (n % 2 == 0) { k = k + (n / 2LL) * 9LL - 6LL; } else { k = k + (n / 2LL) * 9LL; } cout << k; return 0; }