#include<bits/stdc++.h> using namespace std; const int s=1000000007; int main() { int n; cin >> n; cout<<n*3/(1*2)%s<<endl; return 0; }