#include <iostream>
using namespace std;
template <class T0>
void func(const T0& val0)
{
cout << 1 << endl;
}
template <class T0, class T1>
void func(const T0& val0, const T1& val1)
{
cout << 2 << endl;
}
template <class T0, class T1, class T2>
void func(const T0& val0, const T1& val1, const T2& val2)
{
cout << 3 << endl;
}
int main(){
func(1);
func(1,2);
func(1,2,4);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGUgPGNsYXNzIFQwPgp2b2lkIGZ1bmMoY29uc3QgVDAmIHZhbDApCnsKCWNvdXQgPDwgMSA8PCBlbmRsOwp9CnRlbXBsYXRlIDxjbGFzcyBUMCwgY2xhc3MgVDE+CnZvaWQgZnVuYyhjb25zdCBUMCYgdmFsMCwgY29uc3QgVDEmIHZhbDEpCnsKCWNvdXQgPDwgMiA8PCBlbmRsOwp9CnRlbXBsYXRlIDxjbGFzcyBUMCwgY2xhc3MgVDEsIGNsYXNzIFQyPgp2b2lkIGZ1bmMoY29uc3QgVDAmIHZhbDAsIGNvbnN0IFQxJiB2YWwxLCBjb25zdCBUMiYgdmFsMikKewoJY291dCA8PCAzIDw8IGVuZGw7Cn0KCgppbnQgbWFpbigpewoJZnVuYygxKTsKCWZ1bmMoMSwyKTsKCWZ1bmMoMSwyLDQpOwp9