#include using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); int N; cin >> N; cout << (N - min(N, 6)) * 7 + min(N, 6) << endl; }