#include<bits/stdc++.h>
using namespace std;

int main(){
    int N;
    cin>>N;
    vector<int> a;
    for(int i=0;i<N;i++) a[i].push_back();
    sort(a.begin(),a.end());
    int ans = a[N-1] - a[0];
    cout<<ans<<endl;
}