#include int N,a,A,c,m,D,i,d;int main(){for(scanf("%d",&N);i++1?2:c+1,a=A,D=d;printf("%d",m);}