#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; if(N == 1){ cout << 5 << '\n'; }else if(N == 2){ cout << 111 << '\n'; }else if(N == 3){ cout << 1400 << '\n'; }else if(N == 4){ cout << 3140 << '\n'; }else{ cout << 140 << '\n'; } }