import java.util.Scanner;
public class Problem_2839 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int sugar = sc.nextInt();
int cnt = 0;
while (true) {
if (sugar % 5 == 0) {
cnt += sugar / 5;
break;
}
else if(sugar < 3) {
cnt = -1;
break;
}
else {
sugar -= 3;
cnt++;
}
}
System.out.println(cnt);
}
}
'일상' 카테고리의 다른 글
[일상] 백준 Silver II 달성,,, (0) | 2021.10.04 |
---|---|
[일상] 알고리즘 다시 시작,,, (5) | 2021.10.01 |
2954 : 창영이의 일기장 (0) | 2021.08.17 |
2309 : 일곱 난쟁이 (0) | 2021.08.17 |
11399 : ATM (0) | 2021.08.16 |