#include #include using namespace std; using namespace atcoder; typedef modint998244353 mint; typedef long long ll; int main(){ int n; cin >> n; vector a(n); for (int i=0; i> a[i]; } cout << a[n-1] - n << endl; }