#include<bits/stdc++.h>
using namespace std;
int main()
{
	int x;
	scanf("%d",&x);
	printf("%d",100-x%100);
	return 0;
}
#include<cstdio>
#include<algorithm>
using namespace std;
inline int read(){
	char c=getchar();int x=0,f=1;
	for(;c<'0'||c>'9';c=getchar())if(c=='-')f=0;
	for(;c<='9'&&c>='0';c=getchar())x=(x<<1)+(x<<3)+(c^48);
	return f?x:-x;
}
inline int max(int a,int b){return a>b?a:b;}
inline int min(int a,int b){return a<b?a:b;}
int a[4];
int main(){
	for(int i=1;i<=3;i++)a[i]=read();
	sort(a+1,a+4);
	printf("%d",a[2]+a[3]);
	return 0;
}