#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m1 = 2147483647, m = -1;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    m = max(n, m);
    m1 = min(n, m1);
  }
  printf("%d", m - m1);
}
