#include<bits/stdc++.h> using namespace std; int t, n, a[10001]; int main(){ cin >> t; for(int i = 1; i <= t; i++){ cin >> n; for(int j = 1; j <= n; j++){ cin >> a[j]; } for(int j = 2; j <= n; j++){ if(a[j] <= a[j - 1]){ a[j] = a[j - 1] + 1; sum++; } } cout << "Case #" << i <<":" << endl; cout << sum << endl; sum = 0; } }