#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int,int> pii;
typedef vector<int> vii;
typedef vector<pii> vpii;
typedef unordered_map<int,int> umap;
typedef long double ld;
#define fi first
#define se second
#define pb push_back
#define mp make_pairNa
#define popcount __builtin_popcount
#define case cout<<"Case "<<z-t<<": ";
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n,m,i,j,k,t=0,s=0;
    m=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>j;
        m=max(m,j);
        s+=j;
        t+=s;
        cout<<t+(i+1)*m<<endl;
    }
    cout<<endl;
}


#include <bits/stdc++.h>

template <class T>
T read() {
  T num = 0;
  T f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    num = num * 10 + ch - '0';
    ch = getchar();
  }
  return num * f;
}

int main() {
  int x = read<int>();
  int ans = (x - x % 100 + 100) - x;
  printf("%d\n", ans);
  return 0;
}