#include <stdio.h> int main() { int d; scanf("%d",&d); if(d==7) printf("1"); else printf("%d",d+1); return 0; }