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