import std.stdio, std.conv, std.string, std.range, std.algorithm; void main() { auto L = readln.strip.to!int; auto M = readln.strip.to!int; auto N = readln.strip.to!int; int ans; auto money = (100 * L + 25 * M + N) % 1000; foreach_reverse (coin; [1, 25, 100]) { ans += money / coin; money %= coin; } ans.writeln; }