#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,c; scanf("%ld,%ld,...,%ld",&a,&b,&c); printf("%ld",c-b-1); return 0; }