import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.typecons;

void main() {
	auto input = map!(to!int)(readln.split);
	int A = input[0], B = input[1], K = input[2];
	int[] a;
	while (true) {
		a ~= A % 10;
		A /= 10;
		if (A == 0) break;
	}
	int[] b;
	while (true) {
		b ~= B % 10;
		 B /= 10;
		 if (B == 0) break;
	}
	foreach (i; 0..a.length-b.length) {
		b ~= 0;
	}
	int[] c = new int[a.length];
	int borrow = 0;
	foreach (i; 0..a.length) {
		if (a[i] - borrow >= b[i]) {
			c[i] = a[i] - borrow - b[i];
			borrow = 0;
		} else {
			c[i] = a[i] + 10 - borrow - b[i];
			if (K > 0 && i != a.length-1 && a[i+1] != 0) {
				K--;
				borrow = 0;
			} else {
				borrow = 1;
			}
//			borrow = 1;
		}
	}
	bool flag = true;
	foreach_reverse (i; 0..a.length) {
		if (flag) {
			if (c[i] != 0) {
				write(c[i]);
				flag = false;
			}
		} else {
			write(c[i]);
		}
	}
	writeln;
}