#include <iostream> using namespace std; int main() { long long int a,b,c; scanf("%lld,%lld,...,%lld",&a,&b,&c); cout << (c-b-1) << endl; }