#include<stdio.h>
int main(void){
	int n;
	scanf("%d",&n);
	printf("%d",n-1);
	return 0;
}
#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    cout << a*d - b*c << "\n";
    return 0;
}
