#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
class Graph {
 public:
  int vn;
  int sumcost = 0;
  vector<vector<pair<int, int>>> g;
  Graph(int n) {
    vn = n;
    g.resize(n);
  }
  virtual void con(int a, int b, int w) = 0;
  int getWeight(int f, int t) {
    auto itr = lower_bound((g[f]).begin(), (g[f]).end(), make_pair(t, INT_MIN));
    if (itr != g[f].end()) return itr->second;
    return INT_MIN;
  }
  int Costsum() { return sumcost; }
  void scan(int edcount, bool oindexed, bool w) {
    for (int i = (0); (edcount) > i; i++) {
      int a, b, c = 1;
      scanf("%d %d", &a, &b);
      if (w) scanf("%d", &c);
      con(a - oindexed, b - oindexed, c);
    }
  }
};
class BiDGraph : public Graph {
 public:
  BiDGraph(int n) : Graph(n) {}
  void con(int a, int b, int w = 1) {
    g[a].push_back({b, w});
    g[b].push_back({a, w});
    sumcost++;
  }
};
class DGraph : public Graph {
 public:
  DGraph(int n) : Graph(n) {}
  void con(int a, int b, int w = 1) {
    g[a].push_back({b, w});
    sumcost++;
  }
};
signed main() {
  int n;
  scanf("%d", &n);
  printf("%d\n", (n - 1) / 2);
  return 0;
}
