#include <bits/stdc++.h>
using namespace std;
typedef long long lint;
#define _GLIBCXX_DEBUG
#define reps(i, a, n) for (lint i = a; i < (lint)(n); i++)
#define rep(i, n) reps(i, 0, n)
#define repd(i, n) for (lint i = n - 1; i >= 0; i--)
#define INF (int)1e9
#define LINF (lint)1e12
#define pb push_back
#define mp make_pair
#define ALL(v) v.begin(), v.end()
using vi = vector<int>;
using vlint = vector<lint>;
using vs = vector<string>;
using vc = vector<char>;
using vvi = vector<vi>;
using vvlint = vector<vlint>;
using Graph = vector<vector<int>>;
using pii = pair<int, int>;
template <typename T> bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } return false; }
template <typename T> bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; } return false; }

int main() {
	int N;
	cin >> N;
	int ans = 1;
	if (N == 1) {
		ans = 0;
	}
	else {
		ans = N - 1;
	}
	cout << ans << endl;
}
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

void solve()
{
    int c;
    cin >> c;
    cout << c - 1 << "\n";
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while (t--)
    {
        solve();
    }
}
