import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;

void main() {
  int n;
  readf (" %d", &n);
  //3 -> 1 + 2
  //4 -> 1 + 3
  //5 -> (2 + 3, 1 + 4)
  writeln ( (n - 1) / 2);
}

