#include <iostream>
#include <ctime>
#include <cassert>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <fstream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <set>
#include <map>
#include <iomanip>
#define nextLine() { for (int c = getchar(); c != '\n' && c != EOF; c = getchar()); }
#define sqr(a) ((a)*(a))
#define has(mask,i) (((mask) & (1<<(i))) == 0 ? false : true)

#ifdef LOCAL
	#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
	#define eprintf(...)
#endif

#define TASK "equation"
using namespace std;

#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define fi first
#define se second

#if ( _WIN32 || __WIN32__ )
    #define LLD "%I64d"
#else
    #define LLD "%lld"
#endif

typedef long long LL;
typedef long double ldb;
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef vector <bool> vb;
typedef vector <vb> vvb;

const int INF = (1 << 30) - 1;
const ldb EPS = 1e-9;
const ldb PI = fabsl(atan2l(0.0, -1.0));

void solve() {
	int n;
	scanf("%d", &n);
	int answer = 0;
	for (int x = 0; x <= n; x++) {
		for (int y = 0; y <= n; y++) {
			if (x + y + x * y == n) {
				answer++;
			}
		}
	}
	printf("%d\n", answer);
}

int main() {
	clock_t start = clock();
	freopen(TASK".in", "r", stdin);
	freopen(TASK".out", "w", stdout);
	solve();
	eprintf("time: %.6lf\n", (double)(clock() - start) / CLOCKS_PER_SEC);
	return 0;
}
