import std.stdio, std.conv, std.string, std.range, std.math, std.algorithm; void main() { auto W = readln.strip.to!long; auto D = readln.strip.to!long; W.reduce!"a-a/b^^2"(iota(2, D + 1).array.reverse).writeln; }