#include int main() { long long a,b,c; int i,n; while(scanf("%d",&n)==1&&n!=0) { a=0,b=2;