import std.stdio;
import std.bigint;
import std.string;

BigInt n,ne;

bool nd(int num) {
	ne=n+num;
	auto str=ne.toDecimalString();
	int mv=0;
	for (int i=0;i<str.length;i++) mv+=str[i]-'0';
	return mv>num;
}

void main() {
	n = BigInt(chomp(readln()));
	n*=9;

	int ans=0;
	for (int i=30;i>=0;i--) if (nd(ans+(1<<i))) ans+=1<<i;
	writefln("%d",(ans+9)/9);
}