#include <bits/stdc++.h>
const long long int alpha = 1e18;
using namespace std;
int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int largest(long long int arr[], long long int n) {
  return *max_element(arr, arr + n);
}
long long int lcm(long long int a, long long int b) {
  return (a * b) / gcd(a, b);
}
long long int power(long long int x, unsigned long long int y) {
  long long int temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else {
    if (y > 0)
      return x * temp * temp;
    else
      return (temp * temp) / x;
  }
}
bool comp(int a, int b) { return (a < b); }
void divisors(long long int n) {
  vector<long long int> v;
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        v.emplace_back(i);
      else
        v.emplace_back(i);
      v.emplace_back(n / i);
    }
  }
}
bool isPrime(long long int n) {
  if (n == 1) {
    return false;
  }
  long long int i = 2;
  while (i * i <= n) {
    if (n % i == 0) {
      return false;
    }
    i += 1;
  }
  return true;
}
int gcdofarray(vector<long long int> v, long long int n) {
  long long int result = v[0];
  for (long long int i = 1; i < n; i++) result = gcd(v[i], result);
  return result;
}
void factors(long long int n) {
  vector<long long int> v;
  while (n % 2 == 0) {
    cout << 2 << " ";
    n = n / 2;
  }
  for (long long int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      v.emplace_back(i);
      n = n / i;
    }
  }
  if (n > 2) v.emplace_back(n);
}
bool powertwo(long long int x) { return x && (!(x & (x - 1))); }
void solve() {
  long long int n;
  cin >> n;
  cout << (n - 1) / 2;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  solve();
}
