#include using namespace std; int main() { int n,m; int sum = 0; int tmp; cin>>n>>m; for(int i=0; i>tmp; sum+=tmp; } cout<<(sum-m*(n-1))<