#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n; cin >> n;
int t; cin >> t;
for (int i = 2; i <= n; i ++ ) {
int x; cin >> x;
cout << x * t << ' ';
t = x;
}
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int w, b; cin >> w >> b;
string s = "wbwbwwbwbwbw";
for (int i = 0; i < s.size(); i ++ ) {
int x = 0, y = 0;
for (int j = i, cnt = 1; cnt <= w + b; cnt ++, j = (j + 1) % s.size()) {
if (s[j] == 'w') x ++;
else y ++;
}
if (x == w && y == b) {
cout << "Yes\n";
return 0;
}
}
cout << "No\n";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
ll n, k; cin >> n >> k;
ll sum = (1 + k) * k / 2;
set<ll> s;
for (int i = 1; i <= n; i ++ ) {
ll x; cin >> x;
if (!s.count(x) && x >= 1 && x <= k) {
s.insert(x);
sum -= x;
}
}
cout << sum << endl;
return 0;
}