#include<iostream>
#include<future>
longlongfoo(inta,intb,std::future<longlong>last=std::async(std::integral_constant<longlong,1>())){
returna==b?a*last.get():foo((a+b)/2+1,b,std::async(foo,a,(a+b)/2,std::move(last)));
}
intmain(){
std::cout<<foo(1,20)<<std::endl;
}