#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
const int MOD = 1e9 + 7;
string s = "a";
vector<string> ans;
void gen(int pos, int len) {
  if (pos == len) {
    ans.push_back(s);
    return;
  }
  auto x = *max_element(begin(s), end(s));
  for (char c = 'a'; c <= x + 1; ++c) {
    s += c;
    gen(pos + 1, len);
    s.pop_back();
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  gen(1, n);
  cout << ans.size();
}
