import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main2839 {
public static void main(String[] args) throws IOException{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(bf.readLine());
int cnt = 0;
while(true){
if(N%5 == 0){
cnt += N/5;
break;
}
N -= 3;
cnt++;
if(N < 0){
cnt = -1;
break;
}
}
System.out.println(cnt);
}
}
'휴지통 > 알고리즘 & 자료구조' 카테고리의 다른 글
백준 10953 (0) | 2021.08.04 |
---|---|
백준 10828 (0) | 2021.08.04 |
로또의 최고 순위와 최저 순위 [Java] (0) | 2021.07.31 |
백준 2775 (0) | 2021.07.28 |
백준 2750 (0) | 2021.07.28 |